Re: Extremely Low performance with ODBC - Mailing list pgsql-sql

From Steve Crawford
Subject Re: Extremely Low performance with ODBC
Date
Msg-id 48365933.5020900@pinpointresearch.com
Whole thread Raw
In response to Extremely Low performance with ODBC  ("Sebastian Rychter" <srychter@anvet.com.ar>)
List pgsql-sql
Sebastian Rychter wrote: <blockquote cite="mid:004301c8bc39$c43aba40$4cb02ec0$@com.ar" type="cite"><style>
<!--/* Font Definitions */@font-face{font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}/* Style Definitions */p.MsoNormal, li.MsoNormal,
div.MsoNormal{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink{mso-style-priority:99;color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed{mso-style-priority:99;color:purple;text-decoration:underline;}
span.EstiloCorreo17{mso-style-type:personal-compose;font-family:"Calibri","sans-serif";color:windowtext;}
.MsoChpDefault{mso-style-type:export-only;}
@page Section1{size:612.0pt 792.0pt;margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1{page:Section1;}
--> </style><div class="Section1"><p class="MsoNormal"><span lang="EN-US">Hi, I’m executing a query through psql ODBC
whichis taking around 2 minutes to complete. When I run it from PgAdmin it takes less than 3 seconds.</span><p
class="MsoNormal"><spanlang="EN-US">The query itself has :</span><p class="MsoNormal"><span lang="EN-US">. 15 inner
joins(from just around 10 different tables – the other inner joins are using different aliases for the same tables)
</span><pclass="MsoNormal"><span lang="EN-US">. Select statement returns 1 field.</span><p class="MsoNormal"><span
lang="EN-US">.the testing database is selecting only 1 record.</span><p class="MsoNormal"><span lang="EN-US"> </span><p
class="MsoNormal"><spanlang="EN-US">Taking a look at the explain analyze report, I see they are both quite the same and
testedthe ODBC driver through Visual Foxpro and Vb.NET as well, taking both around 2 minutes to finish.</span><p
class="MsoNormal"><spanlang="EN-US"> </span><p class="MsoNormal"><span lang="EN-US">Any idea
?</span></div></blockquote>Don't know if this is your issue but we had a legacy VB/ODBC app that selected a handful (10
orfewer) records from a single table but for some reason behind the scenes we discovered that the app selected the
wholetable. As you might imagine, this caused very poor performance on large tables. EXPLAIN will not reveal this. You
mightwant to set the server to log all transactions and see what the app is really doing at the server level.<br /><br
/>Cheers,<br /> Steve<br /> 

pgsql-sql by date:

Previous
From: "Ramasubramanian G"
Date:
Subject: Re: Substract queries
Next
From: Craig Ringer
Date:
Subject: Re: Extremely Low performance with ODBC