Re: Very slow query (3-4mn) on a table with 25millions rows
От
Tom Lane
Тема
Re: Very slow query (3-4mn) on a table with 25millions rows
Дата
Msg-id
4248.1469470017@sss.pgh.pa.us
Ответ на
Very slow query (3-4mn) on a table with 25millions rows (Abadie Lana)
Список
Дерево обсуждения
Very slow query (3-4mn) on a table with 25millions rows Abadie Lana <Lana.Abadie@iter.org>
Re: Very slow query (3-4mn) on a table with 25millions rows Tom Lane <tgl@sss.pgh.pa.us>
Re: Very slow query (3-4mn) on a table with 25millions
rows Abadie Lana <Lana.Abadie@iter.org>
Re: Very slow query (3-4mn) on a table with 25millions rows Martín Marqués <martin@2ndquadrant.com>
Re: Very slow query (3-4mn) on a table with 25millions
rows Abadie Lana <Lana.Abadie@iter.org>
Re: Very slow query (3-4mn) on a table with 25millions rows Félix GERZAGUET <felix.gerzaguet@gmail.com>
Re: Very slow query (3-4mn) on a table with 25millions rows Félix GERZAGUET <felix.gerzaguet@gmail.com>
Re: Very slow query (3-4mn) on a table with 25millions rows Abadie Lana <Lana.Abadie@iter.org>
Re: Very slow query (3-4mn) on a table with 25millions
rows Abadie Lana <Lana.Abadie@iter.org>
Abadie Lana writes: > 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), the explain utility shows no usage of the scan... That index looks pretty useless judging from the rowcounts, so I'm not surprised that the planner didn't use it. You might have better luck with an index on the split_part expression split_part(split_part((s.attvalue)::text, ' '::text, 1), '.'::text, 1) since it's the join of that to e.name that seems to be actually selective. (The planner doesn't appear to realize that it is, but ANALYZE'ing after creating the index should fix that.) regards, tom lane
В списке pgsql-performance по дате отправления
От: Abadie Lana
Дата: