Re: PsqlODBC slow on UNION queries - Mailing list pgsql-odbc

From Ludek Finstrle
Subject Re: PsqlODBC slow on UNION queries
Date
Msg-id 20060109085745.GC29135@soptik.pzkagis.cz
Whole thread Raw
In response to Re: PsqlODBC slow on UNION queries  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
Responses Re: PsqlODBC slow on UNION queries  (Zoltan Boszormenyi <zboszor@dunaweb.hu>)
List pgsql-odbc
> Well, as I said, doing the same test from PSQL, the performance
> difference is much less. I was really asking about the difference
> between psql and PsqlODBC:
>
>                            psql(output to file)         psqlodbc
> UNION               total time: < 12 sec        first row received after
> 30 seconds
> UNION ALL      total time < 4 sec           first row received instantly

I suppose you have used Declare/Fetch turned on. Please try the same
query in psql client. The exact query you can find in mylog output.
It could be something like
DECLARE CURSOR <CURSOR_NAME> FOR SELECT <your select>;
FETCH FORWARD <number of rows to fetch at first time> FROM <CURSOR_NAME>;

If you have used Server side prepare then query is already different.
It use:
PREPARE <plan_name>[(paremters types)] AS <query>;
EXECUTE <plan_name> [(parameters)];

Regards,

Luf

pgsql-odbc by date:

Previous
From: Ludek Finstrle
Date:
Subject: Re: Output parameter isn't available ???
Next
From: Zoltan Boszormenyi
Date:
Subject: Re: PsqlODBC slow on UNION queries