Re: mal advice in FAQ 4.1.

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, nikolay(at)samokhvalov(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mal advice in FAQ 4.1.
Date: 2007-10-09 19:37:50
Message-ID: 162867790710091237o7e8fb862i417d220c90292cf5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2007/10/9, Martijn van Oosterhout <kleptog(at)svana(dot)org>:
> 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.
>

I agree. I don't wont to remove it from FAQ. I would to add note, so
sometimes is necessary to find other trick.

Regards
Pavel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-10-09 20:10:01 Re: First steps with 8.3 and autovacuum launcher
Previous Message Martijn van Oosterhout 2007-10-09 19:30:59 Re: mal advice in FAQ 4.1.