[PERFORM] Re: Big data INSERT optimization - ExclusiveLock on extension of the table

2016-08-18 Thread pinker
> 1. rename table t01 to t02 OK... > 2. insert into t02 1M rows in chunks for about 100k Why not just insert into t01?? Because of cpu utilization, it speeds up when load is divided > 3. from t01 (previously loaded table) insert data through stored procedure But you renamed t01 so it no longer

[PERFORM] Big data INSERT optimization - ExclusiveLock on extension of the table

2016-08-17 Thread pinker
Hi, the problem I'm dealing with is long holding locks during extensions of table: process xxx still waiting for ExclusiveLock on extension of relation xxx of database xxx after 3000.158 ms My application is write intensive, in one round I need to insert about 1M rows. The general scheme of the p

[PERFORM] Checkpoints tuning

2014-10-23 Thread pinker
I have saved data from pg_stat_bgwriter view following Greg Smith's advice from his book: select now(),* from pg_stat_bgwriter; and then aggregated the data with query from his book as well. checkpoint segments was first 30 and next day I have increased it to 200, and results has changed:

Re: [PERFORM] UNION and bad performance

2014-06-13 Thread pinker
>> rhaas=# explain select a from generate_series(1,100) a union select a >> from generate_series(1,100) a; >> QUERY PLAN >> -- >> HashAggregate (cost=45.00..65.00 rows=2000 widt