index the date and possibly the page and/or page_count column (not to get too carried away). You could even consider making one of those 3 a candidate for a clustered index (depending on the other queries that are run against this table).
-mk -----Original Message----- From: Michael Ross [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:01 AM To: CF-Talk Subject: Improve Query This query is taking alittle long, anyone help me try and make it faster? The table (in sql server) has approx. 500,000 records and is indexed by and idnumber field. SELECT COUNT(PAGE) AS PAGE_COUNT, PAGE FROM tblpage_requests WHERE (DATED BETWEEN '06/1/02' AND '06/18/2002') GROUP BY PAGE ORDER BY PAGE_COUNT DESC thanks ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

