Board index » delphi » Two TQueries accessing same underlying database

Two TQueries accessing same underlying database

Generally, my queries to the database bring back only a few records so
none of them take long

hth

Robert Schieck (TeamB)
MER Systems Inc.
Inprise/Borland/InterBase Search Engine
http://www.mers.com/searchsite.html

 

Re:Two TQueries accessing same underlying database


Hi,

If I have two queries accessing the same physical data and I make a change
via one of the queries, is it then necessary to open and close the second
query to see the changes made by the first query.

If so, how do people handle the situation of large databases where an open
and close could take quite a while to perform?  This has always been a query
I've had regarding queries (I have pre{*word*109}ly used tables in the past).

Thanks

Alex

Re:Two TQueries accessing same underlying database


Quote
"A Vasitch" wrote...

Hi,

Quote
> If I have two queries accessing the same physical data and I make a change
> via one of the queries, is it then necessary to open and close the second
> query to see the changes made by the first query.

Yes, but as queries should only be bringing back a 'handful' of records, so
it should be very quick to open/close them.

Cheers

Phil

Re:Two TQueries accessing same underlying database


Thanks Robert,

So if I am selecting a subset of a database in an SQL statement with a WHERE
clause and there are millions of records but only a few are brought back
then this would not take very long to Close and Open again?

Thanks

Alex

"Robert Schieck (TeamB)" <rschi...@mers.com> wrote in message
news:VA.000000d1.0225ae0b@mers.com...

Quote
> Generally, my queries to the database bring back only a few records so
> none of them take long

> hth

> Robert Schieck (TeamB)
> MER Systems Inc.
> Inprise/Borland/InterBase Search Engine
> http://www.mers.com/searchsite.html

Re:Two TQueries accessing same underlying database


It should be fast provided that the tables are properly indexed and the
optimizer uses those indexes for your select.

Ping

Quote
A Vasitch wrote in message <8mtp9u$j...@bornews.borland.com>...
>Thanks Robert,

>So if I am selecting a subset of a database in an SQL statement with a
WHERE
>clause and there are millions of records but only a few are brought back
>then this would not take very long to Close and Open again?

>Thanks

>Alex

Other Threads