Skip to content

Instantly share code, notes, and snippets.

@djydewang
Last active August 21, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djydewang/965f6c692d06a4a5b857709c5ca43af5 to your computer and use it in GitHub Desktop.
Save djydewang/965f6c692d06a4a5b857709c5ca43af5 to your computer and use it in GitHub Desktop.
GSoC 2019 final report : de-TOAST'ing using an iterator

de-TOAST'ing using an iterator

GSoC 2019 final report

Organisation: PostgreSQL

Mentor: Andrey Borodin x4mmm@yandex-team.ru, Stephen Frost sfrost@snowman.net,
    Tinsane vladimirlesk@yandex-team.ru, Atri Sharma atri.jiit@gmail.com
Student: Binguo Bao djydewang@gmail.com

Project Output

de-TOAST iterate API

The API provide the ability to de-TOAST a fully TOAST'd and compressed field using an iterator, satisfy the requirement that only need a slice of the entire value but don't know the size of the slice in advance, e.g. substring match or getting json object field.
mail list: https://www.postgresql.org/message-id/flat/CAL-OGks_onzpc9M9bXPCztMofWULcFkyeCeKiAgXzwRL8kXiag@mail.gmail.com

Optimize related quries

Impact

  • improve performance of the substring() function, up to 14 times
  • improve performance of the position() function, up to 35 times

Future work

  • The current patchs are close to commit, but has not been merged into the postgres codebase
  • The json-related optimization needs to wait for the de-TOAST iterator patch to be merged into the postgres codebase before submitting the patch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment