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

Database

 
AnswerRe: One more query problem Pin
Mycroft Holmes4-Jun-09 19:42
professionalMycroft Holmes4-Jun-09 19:42 
AnswerRe: One more query problem Pin
Niladri_Biswas6-Jun-09 19:38
Niladri_Biswas6-Jun-09 19:38 
QuestionQuery problem [modified] Pin
sujithkumarsl3-Jun-09 22:31
sujithkumarsl3-Jun-09 22:31 
AnswerRe: Query problem [modified] Pin
Niladri_Biswas6-Jun-09 20:01
Niladri_Biswas6-Jun-09 20:01 
GeneralRe: Query problem Pin
Niladri_Biswas6-Jun-09 20:44
Niladri_Biswas6-Jun-09 20:44 
QuestionDefault Collation Pin
hadad3-Jun-09 22:03
hadad3-Jun-09 22:03 
QuestionPerfomance on the Following Query Pin
Vimalsoft(Pty) Ltd3-Jun-09 20:54
professionalVimalsoft(Pty) Ltd3-Jun-09 20:54 
AnswerRe: Perfomance on the Following Query Pin
Ashfield3-Jun-09 21:04
Ashfield3-Jun-09 21:04 
Have you had a look at the execution plan? That should show where the most time is taken. Just in passing, why 2 inserts when 1 will do - unless I'm missing something this has the same effect


INSERT into tempslot
select distinct sd1.slot as s1, sd2.slot as s2
from [dbo].[EXP_REL_SLOT_DOMN] sd1
inner join [dbo].[EXP_REL_SLOT_DOMN] sd2
on sd1.domn = sd2.domn 
and sd1.slot != sd2.slot


It may be quicker to use a temp table, take the distinct off this query and do a distinct from the temp table as it may have many less records to process.

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

GeneralRe: Perfomance on the Following Query Pin
Vimalsoft(Pty) Ltd3-Jun-09 21:34
professionalVimalsoft(Pty) Ltd3-Jun-09 21:34 
GeneralRe: Perfomance on the Following Query Pin
Ashfield4-Jun-09 1:31
Ashfield4-Jun-09 1:31 
GeneralRe: Perfomance on the Following Query Pin
smcnulty20004-Jun-09 1:58
smcnulty20004-Jun-09 1:58 
AnswerRe: Perfomance on the Following Query Pin
smcnulty20003-Jun-09 22:36
smcnulty20003-Jun-09 22:36 
GeneralRe: Perfomance on the Following Query Pin
Vimalsoft(Pty) Ltd4-Jun-09 0:00
professionalVimalsoft(Pty) Ltd4-Jun-09 0:00 
GeneralRe: Perfomance on the Following Query Pin
Ashfield4-Jun-09 1:24
Ashfield4-Jun-09 1:24 
GeneralRe: Perfomance on the Following Query Pin
smcnulty20004-Jun-09 1:37
smcnulty20004-Jun-09 1:37 
QuestionFind feature in report viewer not working in Reporting services Pin
catmom3-Jun-09 10:51
catmom3-Jun-09 10:51 
QuestionRestore Database Parallel in sqlserver 2005 Pin
s_rajakrishna3-Jun-09 2:45
s_rajakrishna3-Jun-09 2:45 
Questionsql view Pin
jainiraj2-Jun-09 21:34
jainiraj2-Jun-09 21:34 
AnswerRe: sql view Pin
smcnulty20003-Jun-09 15:34
smcnulty20003-Jun-09 15:34 
AnswerRe: sql view Pin
_Damian S_3-Jun-09 16:04
professional_Damian S_3-Jun-09 16:04 
AnswerRe: sql view Pin
A k ch4-Jun-09 22:09
A k ch4-Jun-09 22:09 
Questioncreate proc from assembly Pin
Abdul Rahman Hamidy2-Jun-09 21:22
Abdul Rahman Hamidy2-Jun-09 21:22 
AnswerRe: create proc from assembly Pin
Abdul Rahman Hamidy2-Jun-09 22:01
Abdul Rahman Hamidy2-Jun-09 22:01 
GeneralRe: create proc from assembly Pin
Abdul Rahman Hamidy2-Jun-09 22:10
Abdul Rahman Hamidy2-Jun-09 22:10 
QuestionFind working hours between two dates Pin
Rajesh VR2-Jun-09 20:31
Rajesh VR2-Jun-09 20:31 

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.