From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Craig James <craig_james(at)emolecules(dot)com> |
Cc: | valiouk(at)yahoo(dot)co(dot)uk, psql performance <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Perl/DBI vs Native |
Date: | 2008-07-21 18:44:32 |
Message-ID: | 16163.1216665872@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Craig James <craig_james(at)emolecules(dot)com> writes:
> Valentin Bogdanov wrote:
>> I have ran quite a few tests comparing how long a query takes to
>> execute from Perl/DBI as compared to psql/pqlib. No matter how many
>> times I run the test the results were always the same.
>>
>> I run a SELECT all on a fairly big table and enabled the
>> log_min_duration_statement option. With psql postgres consistently
>> logs half a second while the exact same query executed with Perl/DBI
>> takes again consistently 2 seconds.
> The problem may be that your two tests are not equivalent. When Perl
> executes a statement, it copies the *entire* result set back to the
> client before it returns the first row.
Sure, but so does psql (unless you've turned on the magic FETCH_COUNT
setting). I think the theories about prepared versus literal statements
were more promising; but I don't know DBI well enough to know exactly
what it was sending to the server.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Levi | 2008-07-21 19:01:04 | Re: [BACKUPS]Little backups |
Previous Message | Greg Smith | 2008-07-21 18:43:54 | Re: Performance on Sun Fire X4150 x64 (dd, bonnie++, pgbench) |