pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jenish <jenishvyas@gmail.com>
To: pgsql-performance@postgresql.org
Cc: jenish vyas <jenishvyas@gmail.com>
Subject: Strange behavior of child table.
Date: Tue, 31 May 2011 10:20:59 +0300
Message-ID: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com> (raw)

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.

Table is having index on action_id.

Partition is trigger based.
Postgres Version : (PostgreSQL) 8.4.6

Why there is difference in execution time? What I am doing wrong?



-- 
Thanks & regards,
      JENISH

view thread (3+ messages)  latest in thread

Message-ID: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com>
Permalink:  ../BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@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: jenishvyas@gmail.com
  Subject: Re: Strange behavior of child table.
  In-Reply-To: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@mail.gmail.com>
  References: <BANLkTimZ4iGaJoxX9e5A_sFQVkwV5Muycw@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