Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > Re: Partitioned...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3982 of 4361
Post > Topic >>

Re: Partitioned tables - planner wont use indexes

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
 




 2 Posts in Topic:
Partitioned tables - planner wont use indexes
kevin@[EMAIL PROTECTED]   2008-04-04 16:36:07 
Re: Partitioned tables - planner wont use indexes
lists@[EMAIL PROTECTED]   2008-04-11 12:41:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 20:51:33 CDT 2008.