Обсуждение: odbc/ado problems

Поиск
Список
Период
Сортировка

odbc/ado problems

От
Kroh István
Дата:
Hi all!

I'm new here, so hello to everybody!

I'm in a deep truble using postgesSQL 7.2.0 on a low-end pc with SUSE 8. I'm
using some databases from that pc through odbc (7.3.200). Until now i had no
problems with this solution, everithing worked fine. But today i wrote a
small app, that converts/copies some data from a database to an other
database.

During this work i wrote a simple query as follows:
select pers_driving_license from person where pers_id=23456

This should return a single varchar(20) field. Running this query over
ADO/ODBC from a Delphi app tooks 50-100 secs. If i run this from pgAdmin II.
it takes some msecs.

The output of explain is:
Index Scan using person_id_index on person (cost=0.00..3.14 rows=1 width=4)

Any idea?

Thanks in advance: steve


Re: odbc/ado problems

От
"Markus Donath"
Дата:
hello,

did you use a read only / forward only cursor (adOpenForwardOnly) ?
this is the fastest way to retreive data, other cursor types are much slower
with postgres odbc.

bye,
Markus Donath.


"Kroh Istv�n" <istvan.kroh@pomme.hu> schrieb im Newsbeitrag
news:005a01c48f7f$9ff8ae70$0102a8c0@pomme001...
> Hi all!
>
> I'm new here, so hello to everybody!
>
> I'm in a deep truble using postgesSQL 7.2.0 on a low-end pc with SUSE 8.
I'm
> using some databases from that pc through odbc (7.3.200). Until now i had
no
> problems with this solution, everithing worked fine. But today i wrote a
> small app, that converts/copies some data from a database to an other
> database.
>
> During this work i wrote a simple query as follows:
> select pers_driving_license from person where pers_id=23456
>
> This should return a single varchar(20) field. Running this query over
> ADO/ODBC from a Delphi app tooks 50-100 secs. If i run this from pgAdmin
II.
> it takes some msecs.
>
> The output of explain is:
> Index Scan using person_id_index on person (cost=0.00..3.14 rows=1
width=4)
>
> Any idea?
>
> Thanks in advance: steve
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>



Re: odbc/ado problems

От
"Raymond O'Donnell"
Дата:
On 31 Aug 2004 at 19:26, Kroh Istv n wrote:

> This should return a single varchar(20) field. Running this query over
> ADO/ODBC from a Delphi app tooks 50-100 secs. If i run this from
> pgAdmin II. it takes some msecs.

I have found instantiating and using the ADO objects directly to be
much faster than using the TADOConnection and TADOQuery components
that come with Delphi. - This is in web apps where I'd construct the
SQL and execute it with the Connection object.

--Ray.

-------------------------------------------------------------
Raymond O'Donnell     http://www.galwaycathedral.org/recitals
rod@iol.ie                          Galway Cathedral Recitals
-------------------------------------------------------------