Speed up a query

P

Penn

In a thread of this same name, there was talk about a 'secondary index'
on a table. I don't have much experience with secondary indexes and I
don't know if they would help in this case but I'm hoping for some
ideas.

I have a 'Bookings' report that shows the number of Bookings per
Location per month. It is grouped by Group and by individual Locations
within each Group. The report speed was acceptable until I added (at
the client's request) a Total Number of Occupancy Days per Location per
month (TotOccupDays_L) and the Total Number of Occupancy Days per
Group per month (TotOccupDays_G).

TotOccupDays_L.ControlSource=DLookUp("OccupDays","Q_Bookings_OccupDays","LocationID="
& [LocationID])
Running Sum=No

TotOccupDays_G.ControlSource=DLookUp("OccupDays","Q_Bookings_OccupDays","LocationID="
& [LocationID])
Running Sum=Over All

Due to the DLookUp, the report is now unacceptably SLOW. It takes
several minutes to complete.

I'd like to get rid of the DLookUp but I'm not sure how to go about it.

Any ideas greatly appreciated.

Penn
 

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