From: Martín Marqués <martin@2ndquadrant.com>
To: Abadie Lana <Lana.Abadie@iter.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Very slow query (3-4mn) on a table with 25millions rows
Date: Tue, 26 Jul 2016 07:34:17 -0300
Message-ID: <24ade69a-70bf-4cb1-75ae-03a5481f067a@2ndquadrant.com> (raw)
In-Reply-To: <E544BB9A64ABD24DA201745FD316D94551124F74@XCH2.iter.org>
References: <E544BB9A64ABD24DA201745FD316D94551122DDA@XCH2.iter.org>
<4248.1469470017@sss.pgh.pa.us>
<E544BB9A64ABD24DA201745FD316D94551124F74@XCH2.iter.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: martin@2ndquadrant.com, Lana.Abadie@iter.org, tgl@sss.pgh.pa.us
Subject: Re: Very slow query (3-4mn) on a table with 25millions rows
In-Reply-To: <24ade69a-70bf-4cb1-75ae-03a5481f067a@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox