Re: [PERFORM] query runs for more than 24 hours!

2017-08-22 Thread Tomas Vondra
On 08/22/2017 04:23 PM, Mariel Cherkassky wrote: Hi, I have a query that I run in my postgresql 9.6 database and it runs for more than 24 hours and doesnt finish. My select consist from few joins : I'm sorry, but the query and plans are completely broken (wrapped in funny ways, missing im

[PERFORM] query runs for more than 24 hours!

2017-08-22 Thread Mariel Cherkassky
Hi, I have a query that I run in my postgresql 9.6 database and it runs for more than 24 hours and doesnt finish. My select consist from few joins : SELECT a.inst_prod_id, product_id, nap_area2,

Re: [PERFORM] Query plan for views and WHERE clauses, Luke is not using the index

2017-08-22 Thread kimaidou
Thanks a lot for your detailed explanation. I will try ASAP with no DISTINCT ( we are quite sure it is not needed anyway ), and report back here. Michaƫl 2017-08-21 23:52 GMT+02:00 David Rowley : > On 19 August 2017 at 04:46, kimaidou wrote: > > When we call the WHERE on the view: > > > > EXPLA