Search Postgresql Archives

Re: how to speed up query

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

 



"Andrus" <kobruleht2@xxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux