Q: index questions

M

Mark

Hi all,

Had two questions about indexes and queries
1) suppose I'm doing a simple group query and counting the groups, ie
"select category, count(*) from table1 group by category".
does it help to add an index to the [category] field? I'm thinking no since
you're going to have to count all the records anyway.

2) I recall a way to extract the "explain plan" to see how Access will parse
a query (I think it drops it into a text file) Can anyone tell me how to do
that?

Thanks!
-Mark
 
J

Jerry Whittle

1. You are probably right; however, nothing beats a stopwatch to see what
happens. That and ....

2. Showplan. Google it and you should see plenty of results.
 
M

Mark

1. yeah, I used a timer and I didn't notice any real time difference. Wasn't
sure if it was network latency or something else.
2. Thanks!!

Jerry Whittle said:
1. You are probably right; however, nothing beats a stopwatch to see what
happens. That and ....

2. Showplan. Google it and you should see plenty of results.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Mark said:
Hi all,

Had two questions about indexes and queries
1) suppose I'm doing a simple group query and counting the groups, ie
"select category, count(*) from table1 group by category".
does it help to add an index to the [category] field? I'm thinking no since
you're going to have to count all the records anyway.

2) I recall a way to extract the "explain plan" to see how Access will parse
a query (I think it drops it into a text file) Can anyone tell me how to do
that?

Thanks!
-Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top