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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux