Board index » delphi » ADOQuery Vs ADOTable

ADOQuery Vs ADOTable

Can anyone tell me if I might can a performance increase by swithgin from
ADOTable's to ADOQuery for an Access DB?

--
~~~~~~~~~~~~~
?raig ?eynolds
~~~~~~~~~~~~~
Just because this is never going to work is no reason to be negative!

 

Re:ADOQuery Vs ADOTable


TAdoTable (or TTable..) try to get a lot of records from db.
If your Table on db have many records, this can be very slow.

With TAdoQuery (or TQuery), user MUST set some value to get records
from db.
With a where condition, you get only rercords needed.

Think a internet search engine, like Altavista.
You set a value and it find a lot of web page, but NOT
ALL WEB PAGE!

Using query, you can join a lot of db tables to have
a composite result.

If you use client/server db (Oracle, MySql, Db2, Interbase, etc)
you MUST use query insthead Table!

Bye

AS

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Re:ADOQuery Vs ADOTable


In the case I am currently working with I filter one table dependant on the
value of a field in second table. I have to go through every record in the
second table, so I guess I am not likely to see much improvement.

--
~~~~~~~~~~~~~
?raig ?eynolds
~~~~~~~~~~~~~
Just because this is never going to work is no reason to be negative!

Quote
"Alberto Salvati" <a.salv...@mclink.it> wrote in message

news:1f8d4692bc257446cff1e71936f80173.9005@mygate.mailgate.org...
Quote
> TAdoTable (or TTable..) try to get a lot of records from db.
> If your Table on db have many records, this can be very slow.

> With TAdoQuery (or TQuery), user MUST set some value to get records
> from db.
> With a where condition, you get only rercords needed.

> Think a internet search engine, like Altavista.
> You set a value and it find a lot of web page, but NOT
> ALL WEB PAGE!

> Using query, you can join a lot of db tables to have
> a composite result.

> If you use client/server db (Oracle, MySql, Db2, Interbase, etc)
> you MUST use query insthead Table!

> Bye

> AS

> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

Re:ADOQuery Vs ADOTable


For an -Access- database I kinda doubt it.  But you never know.

The best way to tell is to hook up an ADO monitor to observe what kind
of SQL queries are issued when you open the table or query.  Several
exchanges can take place while the ADOTable object picks up information
about the field structure of the table being opened.  These exchanges
may or may not happen a second time.

Like I said, the best way to observe it is to "look."  There's a lot of
stuff that a fileserver-based database (e.g. Paradox, dBase) can
discover just by "opening the file and reading the header," which is
very fast.  An SQL-based application can't do that:  it has to
interrogate the server, resulting in several transmission-delays.

Quote
>Craig Reynolds wrote:

> Can anyone tell me if I might can a performance increase by swithgin from
> ADOTable's to ADOQuery for an Access DB?

----------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)
Quote
> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  Release 4.0 is here!!
> http://www.sundialservices.com/products/chimneysweep

Other Threads