Re: CRecordSet and Table Indexes
From: Tim (Tim_at_NoSpam)
Date: 05/23/04
- Next message: Jeff Partch [MVP]: "Re: Need To Delete An Object?"
- Previous message: Damien Cymbal: "Re: Question about processing messages during exit"
- In reply to: Steve: "CRecordSet and Table Indexes"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 23 May 2004 13:43:59 +1200
Steve,
Firstly, a table can have many indexes...
It Depends. If the DBMS is SQL Server or one of the later versions of MS
Access then you can use an INFORMATION_SCHEMA view (See SQL Server books
online).
If you are wishing to obtain schema information then the above views are the
right things to use.
If you are wanting to identify what index you are 'using' then outside of
DAO there is 'no such thing' since the DBMS will use whatever indexes it
feels are appropriate for the queries your submit - IE it is dependant on
the DBMS version, the presence of indexes, the layout of your query
(somewhat, particularly early versions of SQL Server), the types of indexes
implicitly referred to (unique, non unique, clustered etc), the distribution
of data, data values supplied in WHERE and JOIN clauses and so on. With SQL
Server if you wish to tune your queries and see which indexes are used after
the fact, you can run the queries in Query Analyser (QA) using 'Show
Execution Plan'. QA is an excellent query tuning tool.
- Tim
"Steve" <anonymous@discussions.microsoft.com> wrote in message
news:463FF96F-975D-4188-B5CF-8037DC8ED61A@microsoft.com...
> How can I use CRecordSet to get the index name of a table? If not
> CRecordSet, what can I use? I need to capture the index name at runtime.
- Next message: Jeff Partch [MVP]: "Re: Need To Delete An Object?"
- Previous message: Damien Cymbal: "Re: Question about processing messages during exit"
- In reply to: Steve: "CRecordSet and Table Indexes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|