Click here to Skip to main content
15,887,676 members
Home / Discussions / Database
   

Database

 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
DQNOK12-Apr-07 12:30
professionalDQNOK12-Apr-07 12:30 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
Chandman12-Apr-07 13:22
Chandman12-Apr-07 13:22 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
Pete O'Hanlon13-Apr-07 1:45
mvePete O'Hanlon13-Apr-07 1:45 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
Chandman13-Apr-07 8:18
Chandman13-Apr-07 8:18 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
Pete O'Hanlon13-Apr-07 9:58
mvePete O'Hanlon13-Apr-07 9:58 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) [modified] Pin
DQNOK13-Apr-07 7:13
professionalDQNOK13-Apr-07 7:13 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
Chandman13-Apr-07 8:10
Chandman13-Apr-07 8:10 
GeneralRe: Help on SQL Crosstab query (VERY SLOW) Pin
DQNOK13-Apr-07 8:30
professionalDQNOK13-Apr-07 8:30 
You're welcome. But, I needed the practice anyway, and besides, once I got thinking about the problem, I couldn't get it off my mind. I'll probably used what I learned in some other project.

True, my Tests table only had 48 rows, but I don't believe that is the issue. If you carefully consider my query, you'll see that the DB engine only has to scan the Cars table once, and (assuming both Tests.CarID and Tests.TestTypeID are indexed) the Tests table ONCE! That is the key. I believe the reason yours is running slowly is due to the complexity of the table structure, not because you're attempting a crosstab.

If it's utterly impossible to simplify the table structure, or to dump just enough of the tables into a simplifed structure so this query will run quickly, then you may be right about not doing it this way.

Good Luck.
GeneralRe: Help on SQL Crosstab query (VERY SLOW) [modified] Pin
Chandman13-Apr-07 10:35
Chandman13-Apr-07 10:35 
Questiongetting data in parts Pin
ArchaBhandare12-Apr-07 2:11
ArchaBhandare12-Apr-07 2:11 
AnswerRe: getting data in parts Pin
Pete O'Hanlon12-Apr-07 2:16
mvePete O'Hanlon12-Apr-07 2:16 
GeneralRe: getting data in parts Pin
Chandman12-Apr-07 6:51
Chandman12-Apr-07 6:51 
GeneralRe: getting data in parts Pin
Pete O'Hanlon12-Apr-07 9:23
mvePete O'Hanlon12-Apr-07 9:23 
AnswerRe: getting data in parts Pin
Elina Blank12-Apr-07 3:58
sitebuilderElina Blank12-Apr-07 3:58 
GeneralRe: getting data in parts Pin
ArchaBhandare12-Apr-07 18:47
ArchaBhandare12-Apr-07 18:47 
GeneralRe: getting data in parts Pin
Elina Blank13-Apr-07 3:58
sitebuilderElina Blank13-Apr-07 3:58 
Questioni have problem Pin
Shuaib wasif khan12-Apr-07 0:42
Shuaib wasif khan12-Apr-07 0:42 
AnswerRe: i have problem Pin
Pete O'Hanlon12-Apr-07 1:24
mvePete O'Hanlon12-Apr-07 1:24 
GeneralRe: i have problem Pin
Paul Conrad12-Apr-07 7:09
professionalPaul Conrad12-Apr-07 7:09 
QuestionProblem In Date In sql Query Pin
Tirthadip11-Apr-07 23:43
Tirthadip11-Apr-07 23:43 
AnswerRe: Problem In Date In sql Query Pin
Shuaib wasif khan11-Apr-07 23:47
Shuaib wasif khan11-Apr-07 23:47 
Questionhow to count how many proc resides in database Pin
Shuaib wasif khan11-Apr-07 23:30
Shuaib wasif khan11-Apr-07 23:30 
AnswerRe: how to count how many proc resides in database Pin
gauthee12-Apr-07 0:11
gauthee12-Apr-07 0:11 
GeneralRe: how to count how many proc resides in database Pin
Shuaib wasif khan12-Apr-07 0:32
Shuaib wasif khan12-Apr-07 0:32 
GeneralRe: how to count how many proc resides in database Pin
gauthee12-Apr-07 0:46
gauthee12-Apr-07 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.