Re: Delphi connection ?

Поиск
Список
Период
Сортировка
От Mark Morgan Lloyd
Тема Re: Delphi connection ?
Дата
Msg-id h9v5kp$fut$1@pye-srv-01.telemetry.co.uk
обсуждение исходный текст
Ответ на Re: Delphi connection ?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
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]

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Re: Delphi connection ?
Следующее
От: Eduardo Morras
Дата:
Сообщение: Re: Postgresql Web Hosting