Thread: odbc : delay time is too long for pgsql 7.4 ??

odbc : delay time is too long for pgsql 7.4 ??

From
linusliu
Date:
Hello : (sorry for repost, typing error)

I am a Delphi programmer.  I use the ODBC to connect to pgsql.
The environment :  old => pgsql 7.2.4, Delphi 5.0  new => pgsql 7.4

I found a problem when I testing the new version of pgsql (7.4).
Detail : If I use a query component to update data with 7.4, I need to
wait for about 15 secs. The version 7.2.4 do not act like this.

I hope can solve this problem. Can anyone know the answer ?

                                                   Linus.Liu.
--
linusliu <linusliu@pchome.com.tw>




==========================================================
 �������@����ADSL
 http://edm-prg.epaper.com.tw/click.php?ad_code=49873
==========================================================
 PChome����~~���������� \*^o^*//
 http://love.pchome.com.tw/
==========================================================

Re: odbc : delay time is too long for pgsql 7.4 ??

From
Jeff Eckermann
Date:
--- linusliu <linusliu@pchome.com.tw> wrote:
> Hello : (sorry for repost, typing error)
>
> I am a Delphi programmer.  I use the ODBC to connect
> to pgsql.
> The environment :  old => pgsql 7.2.4, Delphi 5.0
> new => pgsql 7.4
>
> I found a problem when I testing the new version of
> pgsql (7.4).
> Detail : If I use a query component to update data
> with 7.4, I need to
> wait for about 15 secs. The version 7.2.4 do not act
> like this.
>
> I hope can solve this problem. Can anyone know the
> answer ?

Unlikely that anyone can help you without more
information, for example:
* The code that you are having a problem with
* The data structure in your database (tables, views
etc.)

Is your setup on 7.4 exactly the same as it was on
7.2?  Are you using the same version of the ODBC driver?

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

Re: odbc : delay time is too long for pgsql 7.4 ??

From
Jeff Eckermann
Date:
Don't reply to me, you are much more likely to get
help on the list.  See my few comments below.

--- linusliu <linusliu@pchome.com.tw> wrote:
> Dear Jeff :
>
>   Thanks for your reply. I try the version 7.3.2 and
> 7.4 on the same
> machine. And, I use the same progrem for testing.
> The ODBC is 7.3.2. ( I
> think it is the newest one.)
>
>   About the pgsql, I do nothing but follow the
> installation guide to
> install it and modify the pg_hba.conf. I do the same
> intallation procedure
> on 7.2.4 and 7.4 version. I use the pg_dump to move
> data from the 7.2.4 version
> to the new one.
>
> The result is :
>
>   1. the sql : 'select * from <table name> where
> 1=2'
>
>   2. if <table name> contains lots of data (143050
> records), the first
> time I open the query, the version 7.3.2 & 7.4 : 15
> seconds delay. And
> then I reopen the query with the same SQL command :
> no delay.  I don't
> know why. Only the first time has the problem.
>
>   3. if I oepn a read-only query, no delay.
>
>   4. if <table name> contains less data (2 records),
> no delay.
>
> If possible, can I install 7.2.4 on RedHat Linux 9 ?
> I tried, but failed.
> :)
>
Repeating a query will get you quicker results the
second time, because of caching (I don't understand
the mechanism, but I know that it works).

Hard to tell whether this has anything to do with your
ODBC setup, or whether this is entirely a PostgreSQL
issue.  A couple of things to try:
* Make sure to do "vacuum analyze" on your database
(and repeat regularly)
* Set the "use declare/fetch" option in the ODBC
driver settings to true.
* Test the same queries from the command line, i.e.
psql.  If particular queries perform below your
expectation, run "explain analyze" on the query, and
post the results (with table definitions) to the
pgsql-performance list.
* Search the list archives using keyword "delphi" for
anything that might be relevant for you.

Perhaps others on this list can suggest some other things.

__________________________________
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003