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

2016-07-28 Thread Abadie Lana
es: 0 Total runtime: 47959.180 ms (31 rows) sddcryo=# [iterlogo]<http://www.iter.org/> Lana ABADIE Database Engineer CODAC Section ITER Organization, Building 72/4108, SCOD, Control System Division Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex – France Phone: +33 4 42 1

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

2016-07-27 Thread Abadie Lana
-> Index Only Scan using usertemplvarattribute_atttypeid_key on usertemplvarattribute utva (cost=0.4 2..4.60 rows=9 width=8) (actual time=0.005..0.011 rows=10 loops=16) Index Cond: (usertempvariable_fk = utv.id) Heap Fetches: 0 Total

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

2016-07-26 Thread Abadie Lana
0 Buffers: shared hit=785 Total runtime: 75622.559 ms (104 rows) Lana ABADIE Database Engineer CODAC Section ITER Organization, Building 72/4108, SCOD, Control System Division Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex - France Ph

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

2016-07-26 Thread Abadie Lana
-> Index Only Scan using usertemplvarattribute_atttypeid_key on usertemplvarattribute utva (cost=0.4 2..4.60 rows=9 width=8) (actual time=0.002..0.004 rows=10 loops=256) Index Cond: (usertempvariable_fk = utv.id)

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

2016-07-25 Thread Abadie Lana
Hi all I'm having a problem with a slow query - I tried several things to optimize the queries but didn't really help. The output of explain analyse shows sequential scan on a table of 25 million rows. Even though it is indexed and (I put a multi-column index on the fields used in the query), th