Click here to Skip to main content
15,907,326 members
Home / Discussions / Database
   

Database

 
GeneralDatabases concurrecny issues Pin
Jahangir Jamshed1-Oct-03 19:26
sussJahangir Jamshed1-Oct-03 19:26 
GeneralRe: Databases concurrecny issues Pin
Andy Harman1-Oct-03 22:51
Andy Harman1-Oct-03 22:51 
GeneralRe: Databases concurrecny issues Pin
Mike Dimmick2-Oct-03 3:37
Mike Dimmick2-Oct-03 3:37 
GeneralRe: Databases concurrecny issues Pin
SimonS2-Oct-03 22:46
SimonS2-Oct-03 22:46 
GeneralDataRowState Problems Pin
Wjousts1-Oct-03 11:33
Wjousts1-Oct-03 11:33 
GeneralRe: DataRowState Problems Pin
Giovanni Bejarasco3-Oct-03 1:46
Giovanni Bejarasco3-Oct-03 1:46 
QuestionIndexing Problem??? Pin
Jason Weibel1-Oct-03 8:32
Jason Weibel1-Oct-03 8:32 
AnswerRe: Indexing Problem??? Pin
andyharman1-Oct-03 12:01
professionalandyharman1-Oct-03 12:01 
Can you post the stored procedure here, with details of the indexes that you think should be used and the number of rows expected from each of your tables.

Query Analyzer contains an option to show a graphical "Explain Plan" view of how it is accessing the tables and indexes in your database. If you don't know how to use this then I would heartily suggest that you spend some time become familiar.

From experience, SQL-Server seems prone to using hash-joins to link tables together. Sometimes rewriting your query from:
select * from Department D<br />
inner join Employee E<br />
on E.DeptId = D.DeptId


to:
select * from Department D<br />
inner loop join Employee E<br />
on E.DeptId = D.DeptId


where "loop" is the optimizer hint for a nested-inner join yields better results (if supported by indexes). I also normally order the from clause in the sequence that I would expect the query-optimizer to work (it shouldn't make any difference - but it does serve as useful documentation to other programmers who look at my code).

Tuning queries is a bit of an art-form - there are many different techniques available (clustered indexes, covered indexes, hints, juditious use of temporary tables, inline-views, etc.). I would need to know more details about your specific situation before being able to give a better answer.

Andy
GeneralRe: Indexing Problem??? Pin
Jason Weibel2-Oct-03 12:09
Jason Weibel2-Oct-03 12:09 
GeneralRe: Indexing Problem??? Pin
Mike Dimmick2-Oct-03 12:49
Mike Dimmick2-Oct-03 12:49 
GeneralRe: Indexing Problem??? Pin
Jason Weibel3-Oct-03 6:08
Jason Weibel3-Oct-03 6:08 
GeneralRe: Indexing Problem??? Pin
Mike Dimmick3-Oct-03 6:27
Mike Dimmick3-Oct-03 6:27 
GeneralRe: Indexing Problem??? Pin
Jason Weibel3-Oct-03 6:44
Jason Weibel3-Oct-03 6:44 
GeneralDatabase documentation tools Pin
Michael P Butler1-Oct-03 7:19
Michael P Butler1-Oct-03 7:19 
GeneralRe: Database documentation tools Pin
Mike Dimmick2-Oct-03 3:49
Mike Dimmick2-Oct-03 3:49 
GeneralRe: Database documentation tools Pin
Michael P Butler2-Oct-03 22:47
Michael P Butler2-Oct-03 22:47 
GeneralConvert Access97 to 2000 programmatically Pin
Hans-Georg Ulrich1-Oct-03 5:37
Hans-Georg Ulrich1-Oct-03 5:37 
GeneralRe: Convert Access97 to 2000 programmatically Pin
Mike Ellison2-Oct-03 10:16
Mike Ellison2-Oct-03 10:16 
Generalerror in class type Pin
ranjjj1-Oct-03 5:02
ranjjj1-Oct-03 5:02 
Generalbcp Pin
sardinka1-Oct-03 3:07
sardinka1-Oct-03 3:07 
GeneralUpdating Related Tables Pin
Wjousts30-Sep-03 11:07
Wjousts30-Sep-03 11:07 
GeneralRe: Updating Related Tables Pin
STW2-Oct-03 7:29
STW2-Oct-03 7:29 
GeneralRe: Updating Related Tables Pin
Wjousts2-Oct-03 8:54
Wjousts2-Oct-03 8:54 
GeneralRe: Updating Related Tables Pin
STW2-Oct-03 22:31
STW2-Oct-03 22:31 
GeneralRe: Updating Related Tables Pin
Wjousts3-Oct-03 4:52
Wjousts3-Oct-03 4:52 

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.