Advertisement

09.23.2006 at 03:26PM PDT, ID: 22000390
[x]
Attachment Details

Faster query method

Asked by Coolhand2120 in Databases Miscellaneous

Tags: make, between, methods

I'm using this method:

select count(visitordetailid) from visitordetail where sessionid in (select sessionid from visitors where time between '9/16/2006 00:00:00.000' and '9/23/2006 23:59:59.999' )

To get some counts from a inner table based on the date range of the outer table.  Is there any way to make this faster?  I'm not at all shy about changing the architecture to speed it up.  Right now there is 126835 rows in the inner table  and 18620 in the outer table.

This query takes 55 seconds to execute.  That seems like a lot.

-Coolhand2120Start Free Trial
[+][-]09.23.2006 at 03:56PM PDT, ID: 17584847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.23.2006 at 03:58PM PDT, ID: 17584854

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.23.2006 at 05:43PM PDT, ID: 17585131

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Databases Miscellaneous
Tags: make, between, methods
Sign Up Now!
Solution Provided By: acperkins
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.23.2006 at 05:58PM PDT, ID: 17585160

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.23.2006 at 06:58PM PDT, ID: 17585292

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.23.2006 at 07:26PM PDT, ID: 17585339

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.23.2006 at 07:35PM PDT, ID: 17585361

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2006 at 03:43AM PDT, ID: 17590954

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32