Re: query hangs

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Amit Khandekar" <amit(dot)khandekar(at)enterprisedb(dot)com>, "AI Rumman" <rummandba(at)gmail(dot)com>
Cc: <mabewlun(at)gmail(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: query hangs
Date: 2010-06-14 15:00:33
Message-ID: 4C15FDC1020000250003228B@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

AI Rumman <rummandba(at)gmail(dot)com> wrote:

> [It takes a long time to return 2.6 million rows.]

> Any more idea, please.

I don't recall you telling us exactly what the environment and
connection type is in which you're trying to return this large
result set. Any specific suggestions would depend on that
information.

I do wonder why you are returning 2.6 million rows. A result set
that large is rarely useful directly (except during data conversion
or loading of some sort). Is there any filtering or aggregation
happening on the client side with the received rows? If so, my
first suggestion would be to make that part of the query, rather
than part of the client code.

> Is table partition a good solution for query optimization?

Table partitioning is useful in some cases, but you haven't told us
anything yet to indicate that it would help here.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2010-06-14 15:19:16 Re: Re: [PERFORM] Large (almost 50%!) performance drop after upgrading to 8.4.4?
Previous Message Andy Colson 2010-06-14 13:59:40 Re: Dead lock