From: Jeff Davis <pgsql@j-davis.com>
To: Jenish <jenishvyas@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Strange behavior of child table.
Date: Wed, 01 Jun 2011 11:53:42 -0700
Message-ID: <1306954422.4727.4.camel@jdavis-ux.asterdata.local> (raw)
In-Reply-To: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com>
References: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com>
On Tue, 2011-05-31 at 10:20 +0300, Jenish wrote:
> Hi All,
>
> I have created partition on table Round_Action , which has 3 child
> partition tables.
>
>
> When I am firing a simple select query with limit on parent table it
> is taking huge time to execute. But when I am firing this query
> directly on child table it is taking few milliseconds.
>
>
> EXP.
> select * from Round_Action where action_id =50000 limit 100 →
> execution time 80 sec
> select * from Round_Action_CH1 action_id =50000 limit 100 → execution
> time 0.1 sec
>
> Round_Action is the parent table and has no record in the tables, all
> the records are lying in child tables.
Run EXPLAIN ANALYZE on each of those queries, and post the results.
See http://wiki.postgresql.org/wiki/SlowQueryQuestions for a guide on
how to give the necessary information for others to help.
Regards,
Jeff Davis
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: pgsql@j-davis.com, jenishvyas@gmail.com
Subject: Re: Strange behavior of child table.
In-Reply-To: <1306954422.4727.4.camel@jdavis-ux.asterdata.local>
* 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