Re: Very slow query (3-4mn) on a table with 25millions rows - Mailing list pgsql-performance

From Martín Marqués
Subject Re: Very slow query (3-4mn) on a table with 25millions rows
Date
Msg-id 24ade69a-70bf-4cb1-75ae-03a5481f067a@2ndquadrant.com
Whole thread Raw
In response to Re: Very slow query (3-4mn) on a table with 25millions rows  (Abadie Lana <Lana.Abadie@iter.org>)
Responses Re: Very slow query (3-4mn) on a table with 25millions rows
List pgsql-performance
El 26/07/16 a las 06:01, Abadie Lana escribió:
> Hi Tom,
> Thanks for the hints..
>
> I made various tests for index
> The best I could get is the following one with
> create index vat_funcvaratt_multi_idx on functionalvarattributes(split_part(split_part(attvalue,' ',1),'.',1),
tag_id,atttype_id); 
> analyze functionalvarattributes;

I suggest running analyze over the other tables involved in the query
(or over the whole DB) and then sending back the explain analyze, or
even better EXPLAIN (ANALYZE,BUFFERS).

Some estimates are close and others are really wrong.

I'm not saying that's going to give you a big bust but we'll be able to
see the planner with fresh stats

--
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-performance by date:

Previous
From: Abadie Lana
Date:
Subject: Re: Very slow query (3-4mn) on a table with 25millions rows
Next
From: Abadie Lana
Date:
Subject: Re: Very slow query (3-4mn) on a table with 25millions rows