Re: Extremely Low performance with ODBC

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
Cc: Sebastian Rychter <srychter(at)anvet(dot)com(dot)ar>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Extremely Low performance with ODBC
Date: 2008-05-23 21:07:14
Message-ID: 48373202.10809@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Richard Broersma wrote:
> On Fri, May 23, 2008 at 9:47 AM, Sebastian Rychter
> <srychter(at)anvet(dot)com(dot)ar> wrote:
>> Thanks.. All logs are already off and I'm just sending one query directly
>> from the application (from Visual Foxpro using SQL Pass through and in
>> VB.net using ado.net). I've found that the "problem" is that I'm using
>> implicit joins, and when I change it to explicit Inner Joins the query only
>> takes 3 seconds (as with PgAdmin). I still can't understand if the problem
>> resides on the ODBC driver, the Query Planner or it's just a mix of both.
>
> The next step would be to turn on PostgreSQL's statement logging and
> statement duration. Issue the queries from VFP and then check what
> statement that PG is actually getting. If the statement that PG is
> getting looks good, try executing that statement prefixed with explain
> analyze from the psql command line to help identify where the
> performance problem is.

You know what'd be incredibly handy for this sort of issue?

The ability to set an `always explain analyze' flag on a connection,
preferably as a driver parameter (for ODBC/JDBC) or failing that as a
per-connection variable like the ones to enable/disable seqscan, nested
loop, etc.

That might really help with tracking down issues that appear to only
happen with queries run by an app, or though a particular interface.

Can it be done? Or is the DB server not capable of generating explain
output (say to a log) and also returning a resultset?

--
Craig Ringer

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma 2008-05-23 21:33:27 Re: Extremely Low performance with ODBC
Previous Message Richard Broersma 2008-05-23 20:26:27 Re: Extremely Low performance with ODBC