Re: mal advice in FAQ 4.1.
От | Martijn van Oosterhout |
---|---|
Тема | Re: mal advice in FAQ 4.1. |
Дата | |
Msg-id | 20071009193059.GE8062@svana.org обсуждение исходный текст |
Ответ на | Re: mal advice in FAQ 4.1. ("Pavel Stehule" <pavel.stehule@gmail.com>) |
Ответы |
Re: mal advice in FAQ 4.1.
|
Список | pgsql-hackers |
On Tue, Oct 09, 2007 at 06:40:23PM +0200, Pavel Stehule wrote: > It needs always seq scan :(, and take space on buffer cache. Solution > based on random generated PK are much faster. I collaborate with one > my customer. He shows random products from 10K products on every page > of one eShop. And he cannot understand, so ORDER random() LIMIT is bad > trick, because this trick is on PostgreSQL FAQ. It's the only trick that works in all situations though. There are ofcourse faster methods, but they require information about the distribution of the values, the type, PKs, indexes etc... The standard does have stuff relating to extracting samples from tables, but they're not implemented. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-hackers по дате отправления: