Re: [PERFORM] why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)?

2015-02-02 Thread Jim Nasby
On 2/2/15 7:36 PM, Jim Nasby wrote: Currently the fact that it needs to go back to old tables and FTS them every 2B transactions (or rely on autovacuum for this) and you can't do anything about it (like permanently freeze the tables) seems like a big scalability issue. Does it not?

Re: [PERFORM] why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)?

2015-02-02 Thread Jim Nasby
On 2/2/15 7:01 PM, Slava Mudry wrote: Please don't top-post. It's much better to answer questions inline in an email. I am running PostgreSQL 9.3.2 on linux. Freeze values are defaults. We cannot rely on autovacuum on our current hardware, so it's turned down to 2 workers with naptime=10min.

Re: [PERFORM] working around JSONB's lack of stats?

2015-02-02 Thread Jim Nasby
On 2/1/15 3:08 PM, Josh Berkus wrote: On 01/30/2015 05:34 PM, Jim Nasby wrote: On 1/30/15 2:26 PM, Josh Berkus wrote: This would probably work because there aren't a lot of data structures where people would have the same key:value pair in different locations in the JSON, and care about it

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-02 Thread Marc Mamin
AlexK987 alex.cue@gmail.com writes: I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] ||

Re: [PERFORM] why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)?

2015-02-02 Thread Jim Nasby
On 2/2/15 9:37 PM, Slava Mudry wrote: On Mon, Feb 2, 2015 at 5:52 PM, Jim Nasby jim.na...@bluetreble.com mailto:jim.na...@bluetreble.com wrote: On 2/2/15 7:36 PM, Jim Nasby wrote: Currently the fact that it needs to go back to old tables and FTS them

Re: [PERFORM] why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)?

2015-02-02 Thread Slava Mudry
On Mon, Feb 2, 2015 at 5:52 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 2/2/15 7:36 PM, Jim Nasby wrote: Currently the fact that it needs to go back to old tables and FTS them every 2B transactions (or rely on autovacuum for this) and you can't do anything about it (like permanently

Re: [PERFORM] working around JSONB's lack of stats?

2015-02-02 Thread Merlin Moncure
On Tue, Jan 27, 2015 at 1:06 AM, Josh Berkus j...@agliodbs.com wrote: Folks, Currently, JSONB fields don't have statistics, and estimate a flat 1% selectivity. This can result in poor query plans, and I'm wondering if anyone has a suggested workaround for this short of hacking a new

Re: [PERFORM] Why is GIN index slowing down my query?

2015-02-02 Thread Marc Mamin
AlexK987 alex.cue@gmail.com writes: I've created a GIN index on an INT[] column, but it slows down the selects. Here is my table: create table talent(person_id INT NOT NULL, skills INT[] NOT NULL); insert into talent(person_id, skills) select generate_series, array[0, 1] ||