[PERFORM] Index over all partitions (aka global index)?

2012-10-13 Thread Stefan Keller
Hi, Given I have a large table implemented with partitions and need fast access to a (primary) key value in a scenario where every minute updates (inserts/updates/deletes) are coming in. Now since PG does not allow any index (nor constraint) on "master" table, I have a performance issue (and a po

Re: [PERFORM] Index over all partitions (aka global index)?

2012-10-13 Thread Jeff Janes
On Sat, Oct 13, 2012 at 5:43 PM, Stefan Keller wrote: > > Say, there is a table with 250 mio. rows split into 250 tables with 1 > mio. rows each. And say the the index behavior is O(log n). Then a > search for a key takes O(log(250*n)) or 8.4 time units. What PG (9.1) > currently probably does is

[PERFORM] Query with limit goes from few ms to hours

2012-10-13 Thread henk de wit
On PG 9.1 and 9.2 I'm running the following query: SELECT *FROM stream_store JOIN(SELECT UNNEST(stream_store_ids) AS idFROM stream_store_version_index WHERE stream_id = 607106 AND version = 11) AS records USI