I tried to attack the cost_sort() issues and hope on that basis we can solve problems with 0002 patch and improve incremental sort patch.


OK, will do. Thanks for working on this!

I hope, now we have a better cost_sort(). The obvious way is a try all combination of pathkeys in get_cheapest_group_keys_order() and choose cheapest one by cost_sort(). But it requires N! operations and potentially could be very expensive in case of large number of pathkeys and doesn't solve the issue with user-knows-what-he-does pathkeys. We could suggest an order of pathkeys as patch suggests now and if cost_sort() estimates cost is less than 80% (arbitrary chosen) cost of user-suggested pathkeys then it use our else user pathkeys.


--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/

Reply via email to