Re: [PERFORM] Query planner wants to use seq scan

2015-10-29 Thread Bertrand Paquet
Yes, the three fields index AND vacuum solve the issue. Regards, Bertrand 2015-10-29 13:27 GMT+01:00 Alex Ignatov : > > > On 27.10.2015 23:56, Bertrand Paquet wrote: > > So, > > Tonight, the index on the three field is used, may be my yesterday vacuum > updated stats. &

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
So, Tonight, the index on the three field is used, may be my yesterday vacuum updated stats. Thx you for your help. Regards, Bertrand 2015-10-27 18:33 GMT+01:00 Bertrand Paquet : > Hi tom, > > I did the test yesterday with an index on the three fields, and with a > part

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
solution, even with the In clause ? Regards, Bertrand Le mardi 27 octobre 2015, Tom Lane a écrit : > Bertrand Paquet > writes: > > We have a slow query. After analyzing, the planner decision seems to be > > discutable : the query is faster when disabling seqscan. See below t

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
Hi tom, I did the test yesterday with an index on the three fields, and with a partial index on organization and status and where is null condition on handled. Le mardi 27 octobre 2015, Tom Lane a écrit : > Bertrand Paquet writes: > > We have a slow query. After analyzing, th

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
show random_page_cost ; random_page_cost -- 4 (1 row) 2015-10-27 12:30 GMT+01:00 Alex Ignatov : > > > On 27.10.2015 14:19, Bertrand Paquet wrote: > > relname | n_live_tup | n_dead_tup | last_vacuum > |

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
:10, Bertrand Paquet wrote: > > Yes, I have run VACUUM ANALYZE, no effect. > > Bertrand > > 2015-10-27 12:08 GMT+01:00 Alex Ignatov : > >> On 27.10.2015 12:35, Bertrand Paquet wrote: >> >>> Hi all, >>> >>> We have a slow query. After analyzi

Re: [PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
Yes, I have run VACUUM ANALYZE, no effect. Bertrand 2015-10-27 12:08 GMT+01:00 Alex Ignatov : > On 27.10.2015 12:35, Bertrand Paquet wrote: > >> Hi all, >> >> We have a slow query. After analyzing, the planner decision seems to be >> discutable : the query is fast

[PERFORM] Query planner wants to use seq scan

2015-10-27 Thread Bertrand Paquet
Hi all, We have a slow query. After analyzing, the planner decision seems to be discutable : the query is faster when disabling seqscan. See below the two query plan, and an extract from pg_stats. Any idea about what to change to help the planner ? An information which can be useful : the number

Re: [PERFORM] Performance problem with gin index

2015-09-29 Thread Bertrand Paquet
problem, without disabling fast update. Regards, Bertrand 2015-09-29 19:17 GMT+02:00 Jeff Janes : > On Tue, Sep 29, 2015 at 8:45 AM, Bertrand Paquet < > bertrand.paq...@doctolib.fr> wrote: > >> Hi, >> >> We have got big slow down on our production plateform (

[PERFORM] Performance problem with gin index

2015-09-29 Thread Bertrand Paquet
Hi, We have got big slow down on our production plateform (PG 9.4.4). After analyzing wals with pg_xlogdump, we see lot of writing in Gin Indexes. We suspect slow down are related to the write of pending update on the index. So, is there any method to see - what is the current config of gin_pen