by lists@[EMAIL PROTECTED]
(PFC)
Apr 11, 2008 at 12:41 PM
> I tried removing the index from the part_master table and got the
same=20=
=20
> result
Since all the data is in the partitions, the part_master table is empty,=
=20=20
so the index is not useful for your query.
> myDB=3D# explain SELECT min(logdate) FROM part_master;
Proposals :
1- Use plpgsql to parse the system catalogs, get the list of partitions,=
=20=20
and issue a min() query against each
2- Since dates tend to be incrementing, I guess the minimum date must
not=
=20=20
be changing that often (unless you delete rows) ; therefore if you
need=20=
=20
that information often I suggest a trigger that updates a separate
table=20=
=20
which keeps the min_date (perhaps global or for each client, you choose).
--=20
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance