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

From Tom Lane
Subject Re: mnogosearch -- pgsql seem so slow, please help me find out why
Date
Msg-id 16239.979317562@sss.pgh.pa.us
Whole thread Raw
In response to mnogosearch -- pgsql seem so slow, please help me find out why  ("Thomas T. Thai" <tom@minnesota.com>)
Responses Re: mnogosearch -- pgsql seem so slow, please help me find out why
List pgsql-general
"Thomas T. Thai" <tom@minnesota.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

pgsql-general by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: RE: Correlated subquery/update
Next
From: Peter Gubis
Date:
Subject: on statement triggers