Re: [PERFORM] Very slow query (3-4mn) on a table with 25millions rows

2016-07-27 Thread Abadie Lana
Hello Felix Thanks indeed the new query is much faster…The query itself is complicated to explain basically you can view it as graph and want to make sure that there is no dependencies if I remove a set of points…. explain analyze with filtered_s as ( select s.attvalue from functionalvarattrib

Re: [PERFORM] Very slow query (3-4mn) on a table with 25millions rows

2016-07-27 Thread Félix GERZAGUET
On Wed, Jul 27, 2016 at 11:15 AM, Félix GERZAGUET wrote: > I don't know how to give the planner more accurate info ... > Could you try to materialize the e.name subquery in another table. As in create table func_var_name_for_tpl_15 as select e.name

Re: [PERFORM] Very slow query (3-4mn) on a table with 25millions rows

2016-07-27 Thread Félix GERZAGUET
Hello Lana, On Wed, Jul 27, 2016 at 8:03 AM, Abadie Lana wrote: > Here the result of explain (analyse, buffer). Thanks for your help and let > me know if you need more information. I noticed 3 things in your query: 1. In the second part (after the except), the 2 tables utva and utv are not jo