Re: how to speed up query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to speed up query
Дата
Msg-id 15000.1181758984@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: how to speed up query  ("Andrus" <kobruleht2@hot.ee>)
Ответы Re: how to speed up query
Список pgsql-general
"Andrus" <kobruleht2@hot.ee> writes:
> from pgAdmin, it takes 1 second.
> When I run this command from script it takes 11 minutes!

> Any idea why running this command from script takes 11 minutes?

Different plans maybe?  Try EXPLAIN ANALYZE in both cases.
Do you have work_mem set the same in both cases?

> My script in running in single transaction.
> Should I use commit after index creation or after ANALYZE command?

Hmm, there are some extra cycles involved in examining not-yet-committed
tuples, but I hardly see how that would create a discrepancy of this
size.  Check the plans first.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Ben
Дата:
Сообщение: changing the /tmp/ lock file?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: changing the /tmp/ lock file?