On Thu, Mar 18, 2010 at 16:09, Stephen Frost <sfrost@snowman.net> wrote:
> Corin,
>
> * Corin (wakathane@gmail.com) wrote:
>> {"QUERY PLAN"=>"Total runtime: 5.847 ms"}
>
> This runtime is the amount of time it took for the backend to run the
> query.
>
>> 44.173002243042
>
> These times are including all the time required to get the data back to
> the client. If you don't use cursors, all data from the query is
> returned all at once. Can you post the script you're using along with
> the table schema and maybe some sample or example data? Also, are you
> doing this all inside a single transaction, or are you creating a new
> transaction for every query? I trust you're not reconnecting to the
> database for every query..
Just as a note here, since the OP is using Debian. If you are
connecting over TCP, debian will by default to SSL on your connection
which obviously adds a *lot* of overhead. If you're not actively using
it (in which case you will control this from pg_hba.conf), just edit
postgresql.conf and disable SSL, then restart the server.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/