select max(column) from parent table very slow

From: "Sriram Dandapani" <sdandapani(at)counterpane(dot)com>
To: "Pgsql-Performance \(E-mail\)" <pgsql-performance(at)postgresql(dot)org>
Subject: select max(column) from parent table very slow
Date: 2006-08-24 23:43:53
Message-ID: 6992E470F12A444BB787B5C937B9D4DF057500BF@ca-mail1.cis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Parent table has a column say column1 which is indexed (parent table and
all child tables are indexed on that column)

When a select max(column1) is done on parent table..takes a very long
time to get back with the result

The same query on a child table gives instantaneous response (the tables
are quite large appx.each child table has about 20-30 million rows)

Constraint exclusion is turned on. The column is not the basis for
partitioning. Postgres 8.1.2

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2006-08-25 01:08:49 Re: select max(column) from parent table very slow
Previous Message Merlin Moncure 2006-08-24 20:47:55 adtx