Re: Slow count(*) again...

From: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
To: Pierre C <lists(at)peufeu(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>, Neil Whelchel <neil(dot)whelchel(at)gmail(dot)com>
Subject: Re: Slow count(*) again...
Date: 2010-10-12 22:30:38
Message-ID: 4CB4E18E.2060906@vmsinfo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Pierre C wrote:
>>
>
> Well, suppose you paginate results. If the user sees that the search query
> returns 500 pages, there are two options :
>
With Google, I usually lose patience on the page 3. All that I, as an
end user, need to know is whether there are more than 10 pages. The
fact that there are 1776 pages in the result set is not particularly
useful to me. I couldn't care less whether the number of returned pages
is 1492, 1776 or 1861, I'm going to look at, at most, the first 5 of them.

> - you're google, and your sorting algorithms are so good that the answer
> the user wants is in the first page
> - or the user will refine his search by entering more keywords tu get a
> manageable result set
>
> So, in both cases, the count(*) was useless anyway. And the slowest ones
> are the most useless, since the user will immediatey discard the result
> and refine his query.
>
> If your full text search is slow, try Xapian or Lucene.
>
>
May I also recommend Sphinx? It's a very nice text search engine, with
the price equal to that of Lucene.

--

Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
http://www.vmsinfo.com
The Leader in Integrated Media Intelligence Solutions

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Whelchel 2010-10-12 22:33:33 Re: Slow count(*) again...
Previous Message Tom Lane 2010-10-12 22:21:32 Re: Review: Fix snapshot taking inconsistencies

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Whelchel 2010-10-12 22:33:33 Re: Slow count(*) again...
Previous Message Neil Whelchel 2010-10-12 22:21:31 Re: Slow count(*) again...