How to improve ODBC performance

From: "johnber" <johnber(at)sparqnet(dot)net>
To: pgsql-questions(at)postgresql(dot)org
Subject: How to improve ODBC performance
Date: 2006-10-24 06:56:23
Message-ID: 1161672983.13428.johnber@sparqnet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sir:

I use ODBC driver 8.02 in my Delphi 7 application, and the
ConnectionString="DRIVER={PostgreSQL
Unicode};DATABASE=mydb;SERVER=x.x.x.x;PORT=5432;UID=postgres;PWD=password;Protocol=6.4",

When I send a query--
"SELECT * FROM mytable WHERE grade=4"
to a database which stores 90000 records, it takes about 30
minutes. The performance is too bad.

On the other side, I use ZeosLib's VCL components, It only
takes 30 seconds.

Is there a way to improve ODBC's performance like tunning
the ConnectionString?

I'm sorry for my poor English, below is written in
Traditional Chinese(BIG5) if somebody can read it. :-P

Thank you sincerely

------------------------------------------------------------
我的 Delphi 7 程式嘗試使用 ODBC 8.02 開發, 在 ADOConnection
的 ConnectionString 如上文, 然後送出查詢至一個存有約 90000
萬筆記錄的資料庫, 查詢命令為--
"SELECT * FROM mytable WHERE grade=4"

但效率太差了, 約需 30 分鐘.

而我若以 ZeosLib 的 VCL 元件查詢只需 30 秒, 請問為什麼效率會
相差這麼大, ODBC 的部份可以藉由調整設定來提高效率嗎? 例如改
變 ConnectionString 的寫法.

謝謝

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-10-24 09:24:01 Re: recovery from xid wraparound
Previous Message Shane Wright 2006-10-24 06:43:15 recovery from xid wraparound