Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 24 Oct 2006 14:56:23 +0800 (CST)
  • Message-id: <1161672983(dot)13428(dot)johnber(at)sparqnet(dot)net>

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 的寫法.

謝謝



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group