pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: AI Rumman <rummandba@gmail.com>
To: Amit Khandekar <amit.khandekar@enterprisedb.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: mabewlun@gmail.com
Cc: pgsql-performance@postgresql.org
Subject: Re: query hangs
Date: Sun, 13 Jun 2010 16:45:31 +0600
Message-ID: <AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimOFrRQ46vduEEJfWtJ029j191VLuMC_rgTNrYh@mail.gmail.com>
References: <4C109406020000250003212E@gw.wicourts.gov>
	<AANLkTilYphFD0_ywMnm5I0SbyXnnJ54VQseMMFO38yrm@mail.gmail.com>
	<AANLkTilmAi9LFdd-mps7YbABkKYmKVBDLHjRCGX8cYQL@mail.gmail.com>
	<AANLkTikfCgT40Ehy-8dK5kEZrtbOsFGPzqWHRoTSk5HZ@mail.gmail.com>
	<AANLkTimOFrRQ46vduEEJfWtJ029j191VLuMC_rgTNrYh@mail.gmail.com>

Any more idea, please.
Is table partition a good solution for query optimization?

On Fri, Jun 11, 2010 at 11:09 AM, Amit Khandekar <
amit.khandekar@enterprisedb.com> wrote:

>
>
> On 10 June 2010 18:47, AI Rumman <rummandba@gmail.com> wrote:
>
>> I am using Postgresql 8.1 and did not find FETCH_COUNT
>>
>>
> Oh ok. Looks like FETCH_COUNT was introduced in 8.2
>
>
>> On Thu, Jun 10, 2010 at 6:55 PM, Amit Khandekar <
>> amit.khandekar@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On 10 June 2010 18:05, AI Rumman <rummandba@gmail.com> wrote:
>>>
>>>> Could you please give me the link for cursor- How to use it?
>>>>
>>>>
>>>> On Thu, Jun 10, 2010 at 6:28 PM, Kevin Grittner <
>>>> Kevin.Grittner@wicourts.gov> wrote:
>>>>
>>>>> AI Rumman  wrote:
>>>>>
>>>>> >> Merge Left Join (cost=9500.30..101672.51 rows=2629549 width=506)
>>>>>
>>>>> > And the query does not return data though I have been waiting for
>>>>> > 10 mins.
>>>>> >
>>>>> > Do you have any idea ?
>>>>>
>>>>> Unless you use a cursor, PostgreSQL interfaces typically don't show
>>>>> any response on the client side until all rows have been received and
>>>>> cached on the client side.  That's estimated to be over 2.6 million
>>>>> rows in this case.  That can take a while.
>>>>>
>>>>> You might want to use a cursor....
>>>>>
>>>>>
>>>
>>> If you are using psql client, using FETCH_COUNT to a small value will
>>> allow you to achieve cursor behaviour. psql starts returning batches of
>>> FETCH_COUNT number of rows .
>>>
>>> E.g. \set FETCH_COUNT 1
>>> will start fetching and displaying each row one by one.
>>>
>>>
>>>
>>>
>>>  -Kevin
>>>>>
>>>>
>>>>
>>>
>>
>

view thread (12+ messages)  latest in thread

Message-ID: <AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com>
Permalink:  ../AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com/
Also on:    postgresql.org/message-id/AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: rummandba@gmail.com, amit.khandekar@enterprisedb.com, Kevin.Grittner@wicourts.gov, mabewlun@gmail.com
  Subject: Re: query hangs
  In-Reply-To: <AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com>
  References: <4C109406020000250003212E@gw.wicourts.gov> <AANLkTilYphFD0_ywMnm5I0SbyXnnJ54VQseMMFO38yrm@mail.gmail.com> <AANLkTilmAi9LFdd-mps7YbABkKYmKVBDLHjRCGX8cYQL@mail.gmail.com> <AANLkTikfCgT40Ehy-8dK5kEZrtbOsFGPzqWHRoTSk5HZ@mail.gmail.com> <AANLkTimOFrRQ46vduEEJfWtJ029j191VLuMC_rgTNrYh@mail.gmail.com> <AANLkTilERWIa9HFsrCEzz7T1dkLb-lU6bB20wtJ70_GX@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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