Re: mnogosearch -- pgsql seem so slow, please help me find out why

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: mnogosearch -- pgsql seem so slow, please help me find out why
Date: 2001-01-12 16:39:22
Message-ID: 16239.979317562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas T. Thai" <tom(at)minnesota(dot)com> writes:
> 'select * from url' from psql monitor took 59 seconds.

How big is the table? Your EXPLAIN mentions 99256 rows, but I can't
tell if that stat is up-to-date or not.

A select like that is going to be pretty much all data transfer: read
the disk blocks, format the data values, send 'em to the frontend.
There's hardly anything that Postgres can do to optimize or pessimize
it. You might shave a few milliseconds by using a binary cursor (to
avoid formatting the integer values into ASCII) but probably not a lot.

If you've done a whole lot of UPDATEs/DELETEs on the table since your
last VACUUM, then reading empty disk blocks might be costing you some
time.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Gubis 2001-01-12 16:49:39 on statement triggers
Previous Message Nick Fankhauser 2001-01-12 16:29:53 RE: Correlated subquery/update