Open statement

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 32
Joined: Thu 10 Jan 2013 23:13

Open statement

Post by piopio1 » Thu 26 Jun 2014 10:32


I am trying to improve the performance of a SELECT statement in PGQuery. In addition to set the correct DB indexes, to reduce the number of data to retrieve, what other general advices would you give ? I know this is a very general question but I am just looking for general guidelines.

I have also noticed that setting PGQuery.Prepare= false improves the performance.

Many thanks
Pio Pio

Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Open statement

Post by azyk » Fri 27 Jun 2014 15:47


In order to understand how to increase performance, including on data fetching, using PgDAC behavior, you can read our recommendations in the article ... rmance.htm

For common cases, performance depends not on PgDAC, but on DBMS performance. Therefore forward your questions concerning PostgreSQL server configuration to PostgreSQL developers and documentation.

In addition, you should take into account that PGQuery.Prepare = False can increase performance not for all cases, but for specific ones. And thus, performance depends on PostgreSQL server only, and not on PgDAC.

Post Reply