From: | sergio mayoral <smayoral(at)gmail(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | INSERT query times |
Date: | 2011-07-07 15:35:05 |
Message-ID: | CACcXYZ2aNFFjb5-MzofRoVMV-FkgaczNqYDsKBkWnCMFtB+Q4A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi,
i am using libpq library and postgresql 8.4 for my linux application running
on ARM with 256 MB. I am just doing:
PQconnectdb();
PQexec(INSERT INTO table1 ....); (0.009661 sec.)
PQexec(INSERT INTO table1 ....); (0.004208 sec.)
PQexec(INSERT INTO table2 ....); (0.007352 sec.)
PQexec(INSERT INTO table2 ....); (0.002533 sec.)
PQexec(INSERT INTO table2 ....); (0.002281 sec.)
PQexec(INSERT INTO table2 ....); (0.002244 sec.)
PQexec(INSERT INTO table3 ....); (0.006903 sec.)
PQexec(INSERT INTO table3 ....); (0.002903 sec.)
PQfinnish();
I check the time for each PQexec with gettimeofday function and I always see
that the first INSERT for each table needs longer than the next ones.
this must be something with the parser stage and since i am doing every time
the same queries, I would like to know if there is a way to cache this
queries in order to speed up the first INSERTs.
Thanks in advance,
Sergio
From | Date | Subject | |
---|---|---|---|
Next Message | French, Martin | 2011-07-07 18:54:08 | Re: [PERFORM] DELETE taking too much memory |
Previous Message | jtkells | 2011-07-07 14:33:05 | very large record sizes and ressource usage |