开发者

PostgreSQL: How to force db use the "quicksort" sorting method instead of "top-N heapsort"?

开发者 https://www.devze.com 2023-02-11 01:19 出处:网络
Actually, all my question is written in subj-field. It\'s it somehow possible in PostgreSQL? Probably at server-config level, or can be configured in query, or in properties of table?

Actually, all my question is written in subj-field. It's it somehow possible in PostgreSQL? Probably at server-config level, or can be configured in query, or in properties of table? I hardly tried to google for it, but go开发者_运维问答t no result. So your help would be very appreciated (even pointing me to google with correct query, if i'm mistaken. Thanks beforehand.


You cannot. The planner will pick the more appropriate method based on what you're doing:

  • top-n sort if you've an order by / limit with a reasonably small number;
  • quick sort (in memory or on disk) if not.
0

精彩评论

暂无评论...
验证码 换一张
取 消