Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Unable to see Inexes
Unable to see Inexes
Posted: 2005/07/06 20:48
 
I am unable to see any Indexes on any of my MSSQL Tables...why is this? And do I need to manually build them all? And what is this going to do to performance if I have to wait for an index to be built?

Thanks in advance!
Jim
RE: Unable to see Inexes
Posted: 2005/07/07 00:46
 
Hi !

What is your DBMS ?

How you have tuned TADTable (i think, you use this component) ? Anyway, TADTable is here just for compatibility with BDE components. TADQuery will build 'select * from MyTab' SQL, which is not well for big tables !

For TASTable IndexFieldNames will build ORDER BY phrase of the SELECT query. And it will not build any server index.
For TADQuery, IndexFieldNames will sort records in client cache.

Regards,
Dmitry
RE: Unable to see Inexes
Posted: 2005/07/07 12:40
 
The DBMS is a combination of local (MS Access) and remote (MSSQL).

My concern with the ADQuery is resources...I do not want ALL that data downloaded to my client...some of the tables are quite large...10 million rows or larger...so, how do I make the appropriate connection without consuming all those resources...(i.e., just access the data when I need it).

Thanks again for all your help!

Jim
RE: Unable to see Inexes
Posted: 2005/07/07 17:29
 
Hi !

> My concern with the ADQuery is resources...
> I do not want ALL that data downloaded to my client

TADTable is subclassed from TADQuery. And is programmed to build SELECT * FROM MyTab query. TADTable will add WHERE clause, if properties MasterSource and MasterFields are assigned.

In TADQuery you have complete control. You should write the query with WHERE clause, filtering record set, exactly as you need at client.

If you want to scroll through large record set on client, and keep memory usage low, then set:

TADQuery.FetchOptions.Mode := fmOnDemand;
TADQuery.Unidirectional := True;

Keep in mind, that when Unidirectional = True, you cant use TDBGrid & TADQuery.Prior & TADQuery.First and few other methods.

Regards,
Dmitry
RE: Unable to see Inexes
Posted: 2005/07/07 19:30
 
Great suggestions...thank you so much for the guidance, help and understanding! Much appreciated!!!