Search Postgresql Archives

Re: Delphi connection ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John R Pierce wrote:
Nico Callewaert wrote:

The thing you always hear about ODBC is, that it is very slow ?


ADO is significantly faster than ODBC, so the preferred stack would be delphi -> ado -> postgres ole db -> libpq ->postgres

I believe there exists a delphi->ado wrapper (at least my brief googling popped one up)

Granted that this is a general query issue rather than one specific to Delphi/ODBC etc., but the major speed problem that I see is where I have a clause approximately like

WHERE now() - datetime <= '24 hours'

repeated several times in a query (e.g. in subselects or views). The easiest solution is to replace this with a function returning an timestamp which is evaluated once during query execution.

The moral of the story is that even if your queries are wrapped in a fancy program generated by something like Delphi, always leave yourself a way that you can extract a representative query after any parameterisation and do an EXPLAIN to look for inefficiencies.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux