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

Database

 
QuestionOne more query problem Pin
sujithkumarsl3-Jun-09 23:36
sujithkumarsl3-Jun-09 23:36 
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 
Good Morning All

I have Table Defined as

/****** Object:  Table [dbo].[EXP_REL_SLOT_DOMN]    Script Date: 06/04/2009 08:38:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EXP_REL_SLOT_DOMN](
	[SLOT] [int] NOT NULL,
	[DOMN] [int] NOT NULL,
	[PREF] [int] NOT NULL
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'references TBL_SLOT_ALLC.ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'EXP_REL_SLOT_DOMN', @level2type=N'COLUMN', @level2name=N'SLOT'


indexed as

/****** Object:  Index [EXP_REL_SLOT_DOMN_INDEX]    Script Date: 06/04/2009 08:41:01 ******/
CREATE UNIQUE CLUSTERED INDEX [EXP_REL_SLOT_DOMN_INDEX] ON [dbo].[EXP_REL_SLOT_DOMN] 
(
	[SLOT] ASC,
	[DOMN] ASC,
	[PREF] ASC
)WITH (SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = ON, ONLINE = OFF) ON [PRIMARY]


And i have Two insert statements that takes 29 seconds each

--29 seconds
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


--29 seconds
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



How can i improve the Perfomance of this Insert statements

Thank you
AnswerRe: Perfomance on the Following Query Pin
Ashfield3-Jun-09 21:04
Ashfield3-Jun-09 21:04 
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 

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.