[PERFORM] Which update action quicker?

2014-09-23 Thread Emi Lu
Hello list, For a big table with more than 1,000,000 records, may I know which update is quicker please? (1) update t1   set c1 = a.c1   from a   where pk and

Re: [PERFORM] postgres 9.3 vs. 9.4

2014-09-23 Thread Merlin Moncure
On Tue, Sep 23, 2014 at 7:58 AM, Mkrtchyan, Tigran wrote: > Hi Merlin, > > you are right, in 9.4 the debug_assertions are on: > > # /etc/init.d/postgresql-9.4 start > Starting postgresql-9.4 service: [ OK ] > # psql -U postgres > psql (9.4beta2) > Type "help" for help.

Re: [PERFORM] Slow query

2014-09-23 Thread David G Johnston
Ross Elliott-2 wrote > Maybe someone can explain this. The following SQL will reproduce our > issue: > DROP TABLE IF EXISTS t1 CASCADE; > CREATE TABLE t1 (name text, > state text); > CREATE INDEX t1_name ON t1(name); > CREATE INDEX t1_state ON t1(state); > CREATE INDEX t1_name_stat

Re: [PERFORM] postgres 9.3 vs. 9.4

2014-09-23 Thread Mkrtchyan, Tigran
Hi Merlin, you are right, in 9.4 the debug_assertions are on: # /etc/init.d/postgresql-9.4 start Starting postgresql-9.4 service: [ OK ] # psql -U postgres psql (9.4beta2) Type "help" for help. postgres=# select name,setting from pg_settings where name='debug_asserti

[PERFORM] Slow query

2014-09-23 Thread Ross Elliott
Maybe someone can explain this. The following SQL will reproduce our issue: DROP TABLE IF EXISTS t1 CASCADE; CREATE TABLE t1 (name text, state text); CREATE INDEX t1_name ON t1(name); CREATE INDEX t1_state ON t1(state); CREATE INDEX t1_name_state ON t1(name,state); -- Create some