pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSorry I see my first question did not get posted (maybe because of the attatchments)
2+ messages / 2 participants
[nested] [flat]
* Sorry I see my first question did not get posted (maybe because of the attatchments)
@ 2005-01-26 03:54 Joel Fradkin <jfradkin@wazagua.com>
2005-01-26 08:50 ` Re: Sorry I see my first question did not get posted (maybe Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 2+ messages in thread
From: Joel Fradkin @ 2005-01-26 03:54 UTC (permalink / raw)
To: pgsql-sql
Basically the question was why would a view use an indexed search on one
result set but a seq search on a larger result set. Same view only
difference is how many rows are returned. The large result set was doing a
seq search and did not return after several minutes. The same sql ran in 135
seconds on my MSSQL system.
Joel Fradkin
Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel. 941-753-7111 ext 305
jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Sorry I see my first question did not get posted (maybe
2005-01-26 03:54 Sorry I see my first question did not get posted (maybe because of the attatchments) Joel Fradkin <jfradkin@wazagua.com>
@ 2005-01-26 08:50 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2005-01-26 08:50 UTC (permalink / raw)
To: Joel Fradkin <jfradkin@wazagua.com>; +Cc: pgsql-sql
Joel Fradkin wrote:
> Basically the question was why would a view use an indexed search on one
> result set but a seq search on a larger result set. Same view only
> difference is how many rows are returned. The large result set was doing a
> seq search and did not return after several minutes. The same sql ran in 135
> seconds on my MSSQL system.
Accessing an index 1000 times then reading 1000 rows may be slower than
just reading a whole table of 2000 rows.
You can examine what PostgreSQL thinks the query will cost by running an
explain: EXPLAIN ANALYSE SELECT ...
This will display two sets of figures for each stage, the expected costs
and the actual.
Finally, make sure your configuration settings are reasonable. Read
through the guide at:
http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php
There's a -performance list that specialises in dealing with these
issues. If you post there, mention you've tuned as per GeneralBits and
provide an example of the query, view definition and the output from
explain.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-01-26 08:50 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 03:54 Sorry I see my first question did not get posted (maybe because of the attatchments) Joel Fradkin <jfradkin@wazagua.com>
2005-01-26 08:50 ` Re: Sorry I see my first question did not get posted (maybe Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox