diff options
author | ChangBo Guo(gcb) <eric.guo@easystack.cn> | 2017-02-06 10:38:05 +0800 |
---|---|---|
committer | ChangBo Guo(gcb) <eric.guo@easystack.cn> | 2017-02-06 23:24:35 +0800 |
commit | 9fb3c018fc16c8f5b781c119dd3c148ed7954db7 (patch) | |
tree | 616a323a837e5d329883416b7f2e40517da28112 /setup.cfg | |
parent | fcc794f531777ed1b80962ad700a166bff8c47c6 (diff) | |
download | oslo-db-9fb3c018fc16c8f5b781c119dd3c148ed7954db7.tar.gz |
Explain paginate_query doesn't provide parameter offset
OFFSET is a terrible thing to use. It seems to work great when you
first use it because your table is only a few hundred rows. six months
later, everyone complains the app is incredibly slow - it's because the
database is being killed doing linear scans through millions of rows
because everyone's doing OFFSET. It not only causes slow and unusable
applications but hurts everyone by adding tons of meaningless work to
the DB load overall.
This pagination function already does the "right" way, which is to order
the rows and use WHERE criteria (See http://use-the-index-luke.com/no-offset).
This commit add docstring to explain why don't need offset.
Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I6fdb094085d133c8910415efea2eb44225a66216
Diffstat (limited to 'setup.cfg')
0 files changed, 0 insertions, 0 deletions