pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludek Finstrle <luf@pzkagis.cz>
To: Zoltan Boszormenyi <zboszor@dunaweb.hu>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-odbc@postgresql.org
Subject: Re: PsqlODBC slow on UNION queries
Date: Mon, 9 Jan 2006 09:57:45 +0100
Message-ID: <20060109085745.GC29135@soptik.pzkagis.cz> (raw)
In-Reply-To: <43C1FEEF.5060107@dunaweb.hu>
References: <43C1F84A.90707@dunaweb.hu>
	<25908.1136783922@sss.pgh.pa.us>
	<43C1FEEF.5060107@dunaweb.hu>

> 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



view thread (15+ messages)  latest in thread

Message-ID: <20060109085745.GC29135@soptik.pzkagis.cz>
Permalink:  ../20060109085745.GC29135@soptik.pzkagis.cz/
Also on:    postgresql.org/message-id/20060109085745.GC29135@soptik.pzkagis.cz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: luf@pzkagis.cz, zboszor@dunaweb.hu, tgl@sss.pgh.pa.us
  Subject: Re: PsqlODBC slow on UNION queries
  In-Reply-To: <20060109085745.GC29135@soptik.pzkagis.cz>
  References: <43C1F84A.90707@dunaweb.hu> <25908.1136783922@sss.pgh.pa.us> <43C1FEEF.5060107@dunaweb.hu> <20060109085745.GC29135@soptik.pzkagis.cz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox