Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLEAS with same SELECT takes 7 minutes
В списке pgsql-performance по дате отправления:
| От | Justin Pryzby |
|---|---|
| Тема | Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLEAS with same SELECT takes 7 minutes |
| Дата | |
| Msg-id | 20180927193313.GI776@telsasoft.com обсуждение исходный текст |
| Ответ на | Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE ASwith same SELECT takes 7 minutes (Arjun Ranade <ranade@nodalexchange.com>) |
| Ответы |
Re: SELECT statement returns in 10seconds, but INSERT/CREATE TABLE ASwith same SELECT takes 7 minutes
|
| Список | pgsql-performance |
On Thu, Sep 27, 2018 at 03:37:57PM -0400, Arjun Ranade wrote: > Yes, that join is concerning (red text below). The conditions all need to > be checked so they are independent. You can play with the join conditions to see which test is getting such a bad estimate, or if it's a combination of tests (as I suspected) giving a bad estimate. There's a good chance this one isn't doing very well: > vw2.product_group_name ||'.'|| vw2.product_node_name = i.product_node_name As a workaround/test, you could maybe add an expression index ON( (vw2.product_group_name ||'.'|| vw2.product_node_name) ) ..and then ANALYZE. Eventually, you'd want to consider splitting i.product_node_name into separate columns. Justin
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера