On Mon, Mar 21, 2005 at 09:55:03AM -0800, Josh Berkus wrote: > Stacy, > > > Luckily they that had the chance to work with a truly fantastic DBA (the > > author of an Oracle Press performance tuning book even) before they could > > switch back. He convinced them to make some of their indexes global. > > Performance dramatically improved (compared with both the unpartitioned > > schema, and the partitioned-and-locally-indexed schema), and they've since > > stayed with partitioned tables and a mix of local and global indexes. > > Hmmm. Wouldn't Greg's suggestion of a bitmap index which holds information > on > what values are found in what partition also solve this? Without 1/2 of > the overhead imposed by global indexes? > > I can actually see such a bitmap as being universally useful to the > partitioning concept ... for one, it would resolve the whole "partition on > {value}" issue.
I suspect both will have their uses. I've read quite a bit about global v. local indexs in Oracle, and there are definately cases where global is much better than local. Granted, there's some things with how Oracle handles their catalog, etc. that might make local indexes more expensive for them than they would be for PostgreSQL. It's also not clear how much a 'partition bitmap' index would help. As for the 'seqscan individual partitions' argument, that's not going to work well at all for a case where you need to hit a relatively small percentage of rows in a relatively large number of partitions. SELECT ... WHERE customer_id = 1 would be a good example of such a query (assuming the table is partitioned on something like invoice_date). -- Jim C. Nasby, Database Consultant [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq