Search Postgresql Archives

First inserts are faster than second ones

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

 



Hi there.

I have a strange behaviour about INSERT execution. I have very dummy
PL/pgSQL function, which SELECT data from table; if data exists - skip, if
not - add one. It's about 3'000'000 execution per program life.

Everything works. But there are one weird thing. After DROP TABLE and then
CREATE TABLE (CREATE INDEX), it's must faster to work for this function.
After initial INSERTs the speed of execution about 5 minutes. But,
transaction may fail. If it fail, I can change data and run this function
from the beginning. The second pass on the empty tables are much slower,
about 1,5 hours. So, I decide to DROP TABLE and CREATE it again and gain
much speedup.

Is it normal?

Thanks for patience.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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