Re: Slow query, possibly not using index - Mailing list pgsql-performance

From Wael Khobalatte
Subject Re: Slow query, possibly not using index
Date
Msg-id CAJZ8yobjDP8zGa4V19ydHHTbE75tV_bE2vpkLj-=j-boZ6eQZg@mail.gmail.com
Whole thread Raw
In response to Re: Slow query, possibly not using index  (Les <nagylzs@gmail.com>)
List pgsql-performance
> Nobody ever deleted anything from this table. Since it was created, this has been a write-only table.

does write-only include updates? that would create the dead rows tom is referring to.

> I believe it is not actually using the index, because reading a single (random?) entry from an index should not run for >10 minutes.

it is using the index. You can disable it, and see how long your query takes ("set enable_indexonlyscan = off", optionally enable_indexscan too), chances are it will take even longer. If somehow it does not, by luck, then you no vacuum has run for a while, for some reason (perhaps canceled due to frequent table activity?). That too you can check. 

pgsql-performance by date:

Previous
From: Les
Date:
Subject: Re: Slow query, possibly not using index
Next
From: Tom Lane
Date:
Subject: Re: Slow query, possibly not using index