Does the performance increase if the same index created on
the table twice ?. Say I have a 2 nonclustered index on
the same column. Does it increase the performance or the
performance will be the same if there is only 1 index on
that column ?
Thanks.
The engine can only use one index, so no. In fact, I would bet this would
be worse off for your system... first, the engine has to consider another
option when creating a query plan, plus the extra space the additional index
will require.
Why do you think this would be better?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jim" <anonymous@.discussions.microsoft.com> wrote in message
news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
> Does the performance increase if the same index created on
> the table twice ?. Say I have a 2 nonclustered index on
> the same column. Does it increase the performance or the
> performance will be the same if there is only 1 index on
> that column ?
> Thanks.
|||I never thought it would be better. Our dumb developers
created a couple of indexes like that in the production
database and I removed the duplicates thinking it wouldn't
cause performance issues............
Thanks.........
>--Original Message--
>The engine can only use one index, so no. In fact, I
would bet this would
>be worse off for your system... first, the engine has to
consider another
>option when creating a query plan, plus the extra space
the additional index
>will require.
>Why do you think this would be better?
>--
>Aaron Bertrand
>SQL Server MVP
>http://www.aspfaq.com/
>
>
>"Jim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
on
>
>.
>
|||Yes bad practise - no reason for it and like Aaron said, there's the disk space too. Also, when you modify the data you have to change the data in the table and the two indexes. You should get your developers to script their indexes (and make sure they na
me them!)
Alicia
Http://www.sqlporn.co.uk
Showing posts with label onthe. Show all posts
Showing posts with label onthe. Show all posts
Monday, March 26, 2012
Index question
Does the performance increase if the same index created on
the table twice ?. Say I have a 2 nonclustered index on
the same column. Does it increase the performance or the
performance will be the same if there is only 1 index on
that column '
Thanks.The engine can only use one index, so no. In fact, I would bet this would
be worse off for your system... first, the engine has to consider another
option when creating a query plan, plus the extra space the additional index
will require.
Why do you think this would be better?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jim" <anonymous@.discussions.microsoft.com> wrote in message
news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
> Does the performance increase if the same index created on
> the table twice ?. Say I have a 2 nonclustered index on
> the same column. Does it increase the performance or the
> performance will be the same if there is only 1 index on
> that column '
> Thanks.|||I never thought it would be better. Our dumb developers
created a couple of indexes like that in the production
database and I removed the duplicates thinking it wouldn't
cause performance issues............
Thanks.........
>--Original Message--
>The engine can only use one index, so no. In fact, I
would bet this would
>be worse off for your system... first, the engine has to
consider another
>option when creating a query plan, plus the extra space
the additional index
>will require.
>Why do you think this would be better?
>--
>Aaron Bertrand
>SQL Server MVP
>http://www.aspfaq.com/
>
>
>"Jim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
on[vbcol=seagreen]
>
>.
>|||Yes bad practise - no reason for it and like Aaron said, there's the disk sp
ace too. Also, when you modify the data you have to change the data in the t
able and the two indexes. You should get your developers to script their ind
exes (and make sure they na
me them!)
Alicia
Http://www.sqlporn.co.uk
the table twice ?. Say I have a 2 nonclustered index on
the same column. Does it increase the performance or the
performance will be the same if there is only 1 index on
that column '
Thanks.The engine can only use one index, so no. In fact, I would bet this would
be worse off for your system... first, the engine has to consider another
option when creating a query plan, plus the extra space the additional index
will require.
Why do you think this would be better?
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Jim" <anonymous@.discussions.microsoft.com> wrote in message
news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
> Does the performance increase if the same index created on
> the table twice ?. Say I have a 2 nonclustered index on
> the same column. Does it increase the performance or the
> performance will be the same if there is only 1 index on
> that column '
> Thanks.|||I never thought it would be better. Our dumb developers
created a couple of indexes like that in the production
database and I removed the duplicates thinking it wouldn't
cause performance issues............
Thanks.........
>--Original Message--
>The engine can only use one index, so no. In fact, I
would bet this would
>be worse off for your system... first, the engine has to
consider another
>option when creating a query plan, plus the extra space
the additional index
>will require.
>Why do you think this would be better?
>--
>Aaron Bertrand
>SQL Server MVP
>http://www.aspfaq.com/
>
>
>"Jim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:eb3a01c43cef$a527b630$a301280a@.phx.gbl...
on[vbcol=seagreen]
>
>.
>|||Yes bad practise - no reason for it and like Aaron said, there's the disk sp
ace too. Also, when you modify the data you have to change the data in the t
able and the two indexes. You should get your developers to script their ind
exes (and make sure they na
me them!)
Alicia
Http://www.sqlporn.co.uk
Friday, February 24, 2012
Index creation
Dears,
I have question regarding to some nonclustered indexes that were created on
the database. The company that is that has created this database is saying
that these indexes were created by our own.
My question is that, can indexes be created some how without command CREATE
INDEX or through Enterprise Manger on table.
I'm doing also DBCC DBREINDEX on table, but this can't create new index as
far as I know?
Can you please give me a feedback based on your experience, how this exactly
happenned? And can I discover let's say when this index was created and
additional information bisides sysindexes, much descriptive information.
Thank you,
BaniSQL.
Hi
Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
unique index to enforce uniqueness
Also ,when you create a PRIMARY KEY on the table SQL Server creates a
clustered index to enforce uniqueness
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
Its rebuild the existing indexes not creating
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
sp_helpindex 'tablename'
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
> Dears,
> I have question regarding to some nonclustered indexes that were created
> on
> the database. The company that is that has created this database is saying
> that these indexes were created by our own.
> My question is that, can indexes be created some how without command
> CREATE
> INDEX or through Enterprise Manger on table.
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
> Thank you,
> BaniSQL.
|||Thanks for your reply,
with PK contraint (clustered index) is fine, my question is does FK fields
can create indexes? Becuase I have only FK constraints when I ran sp_help
against the table.
And for information regarding to the for the particular index index I'm
interested to find: date of creation, user etc. from MDF not LDF.
Best,
ProBani.
"Uri Dimant" wrote:
> Hi
> Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
> unique index to enforce uniqueness
> Also ,when you create a PRIMARY KEY on the table SQL Server creates a
> clustered index to enforce uniqueness
>
> Its rebuild the existing indexes not creating
>
> sp_helpindex 'tablename'
>
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
>
>
|||Hi
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when
No , it does not.
select * from master..sysdatabases
You need crdate column
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:EF5F8DB2-40BE-47E6-A21B-92C73C547DC1@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply,
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when I ran sp_help
> against the table.
> And for information regarding to the for the particular index index I'm
> interested to find: date of creation, user etc. from MDF not LDF.
> Best,
> ProBani.
> "Uri Dimant" wrote:
I have question regarding to some nonclustered indexes that were created on
the database. The company that is that has created this database is saying
that these indexes were created by our own.
My question is that, can indexes be created some how without command CREATE
INDEX or through Enterprise Manger on table.
I'm doing also DBCC DBREINDEX on table, but this can't create new index as
far as I know?
Can you please give me a feedback based on your experience, how this exactly
happenned? And can I discover let's say when this index was created and
additional information bisides sysindexes, much descriptive information.
Thank you,
BaniSQL.
Hi
Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
unique index to enforce uniqueness
Also ,when you create a PRIMARY KEY on the table SQL Server creates a
clustered index to enforce uniqueness
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
Its rebuild the existing indexes not creating
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
sp_helpindex 'tablename'
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
> Dears,
> I have question regarding to some nonclustered indexes that were created
> on
> the database. The company that is that has created this database is saying
> that these indexes were created by our own.
> My question is that, can indexes be created some how without command
> CREATE
> INDEX or through Enterprise Manger on table.
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
> Thank you,
> BaniSQL.
|||Thanks for your reply,
with PK contraint (clustered index) is fine, my question is does FK fields
can create indexes? Becuase I have only FK constraints when I ran sp_help
against the table.
And for information regarding to the for the particular index index I'm
interested to find: date of creation, user etc. from MDF not LDF.
Best,
ProBani.
"Uri Dimant" wrote:
> Hi
> Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
> unique index to enforce uniqueness
> Also ,when you create a PRIMARY KEY on the table SQL Server creates a
> clustered index to enforce uniqueness
>
> Its rebuild the existing indexes not creating
>
> sp_helpindex 'tablename'
>
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
>
>
|||Hi
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when
No , it does not.
select * from master..sysdatabases
You need crdate column
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:EF5F8DB2-40BE-47E6-A21B-92C73C547DC1@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply,
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when I ran sp_help
> against the table.
> And for information regarding to the for the particular index index I'm
> interested to find: date of creation, user etc. from MDF not LDF.
> Best,
> ProBani.
> "Uri Dimant" wrote:
Index creation
Dears,
I have question regarding to some nonclustered indexes that were created on
the database. The company that is that has created this database is saying
that these indexes were created by our own.
My question is that, can indexes be created some how without command CREATE
INDEX or through Enterprise Manger on table.
I'm doing also DBCC DBREINDEX on table, but this can't create new index as
far as I know?
Can you please give me a feedback based on your experience, how this exactly
happenned? And can I discover let's say when this index was created and
additional information bisides sysindexes, much descriptive information.
Thank you,
BaniSQL.Hi
Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
unique index to enforce uniqueness
Also ,when you create a PRIMARY KEY on the table SQL Server creates a
clustered index to enforce uniqueness
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
Its rebuild the existing indexes not creating
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
sp_helpindex 'tablename'
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
> Dears,
> I have question regarding to some nonclustered indexes that were created
> on
> the database. The company that is that has created this database is saying
> that these indexes were created by our own.
> My question is that, can indexes be created some how without command
> CREATE
> INDEX or through Enterprise Manger on table.
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
> Thank you,
> BaniSQL.|||Thanks for your reply,
with PK contraint (clustered index) is fine, my question is does FK fields
can create indexes? Becuase I have only FK constraints when I ran sp_help
against the table.
And for information regarding to the for the particular index index I'm
interested to find: date of creation, user etc. from MDF not LDF.
Best,
ProBani.
"Uri Dimant" wrote:
> Hi
> Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
> unique index to enforce uniqueness
> Also ,when you create a PRIMARY KEY on the table SQL Server creates a
> clustered index to enforce uniqueness
>
> Its rebuild the existing indexes not creating
>
> sp_helpindex 'tablename'
>
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
>
>|||Hi
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when
No , it does not.
select * from master..sysdatabases
You need crdate column
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:EF5F8DB2-40BE-47E6-A21B-92C73C547DC1@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply,
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when I ran sp_help
> against the table.
> And for information regarding to the for the particular index index I'm
> interested to find: date of creation, user etc. from MDF not LDF.
> Best,
> ProBani.
> "Uri Dimant" wrote:
>
I have question regarding to some nonclustered indexes that were created on
the database. The company that is that has created this database is saying
that these indexes were created by our own.
My question is that, can indexes be created some how without command CREATE
INDEX or through Enterprise Manger on table.
I'm doing also DBCC DBREINDEX on table, but this can't create new index as
far as I know?
Can you please give me a feedback based on your experience, how this exactly
happenned? And can I discover let's say when this index was created and
additional information bisides sysindexes, much descriptive information.
Thank you,
BaniSQL.Hi
Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
unique index to enforce uniqueness
Also ,when you create a PRIMARY KEY on the table SQL Server creates a
clustered index to enforce uniqueness
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
Its rebuild the existing indexes not creating
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
sp_helpindex 'tablename'
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
> Dears,
> I have question regarding to some nonclustered indexes that were created
> on
> the database. The company that is that has created this database is saying
> that these indexes were created by our own.
> My question is that, can indexes be created some how without command
> CREATE
> INDEX or through Enterprise Manger on table.
> I'm doing also DBCC DBREINDEX on table, but this can't create new index as
> far as I know?
> Can you please give me a feedback based on your experience, how this
> exactly
> happenned? And can I discover let's say when this index was created and
> additional information bisides sysindexes, much descriptive information.
> Thank you,
> BaniSQL.|||Thanks for your reply,
with PK contraint (clustered index) is fine, my question is does FK fields
can create indexes? Becuase I have only FK constraints when I ran sp_help
against the table.
And for information regarding to the for the particular index index I'm
interested to find: date of creation, user etc. from MDF not LDF.
Best,
ProBani.
"Uri Dimant" wrote:
> Hi
> Yes, when you create a UNIQUE CONSTRAINT sql server creates non-clustered
> unique index to enforce uniqueness
> Also ,when you create a PRIMARY KEY on the table SQL Server creates a
> clustered index to enforce uniqueness
>
> Its rebuild the existing indexes not creating
>
> sp_helpindex 'tablename'
>
> "BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
> news:62D2D737-3906-40D5-9AF1-10437FE7C23E@.microsoft.com...
>
>|||Hi
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when
No , it does not.
select * from master..sysdatabases
You need crdate column
"BaniSQL" <BaniSQL@.discussions.microsoft.com> wrote in message
news:EF5F8DB2-40BE-47E6-A21B-92C73C547DC1@.microsoft.com...[vbcol=seagreen]
> Thanks for your reply,
> with PK contraint (clustered index) is fine, my question is does FK
> fields
> can create indexes? Becuase I have only FK constraints when I ran sp_help
> against the table.
> And for information regarding to the for the particular index index I'm
> interested to find: date of creation, user etc. from MDF not LDF.
> Best,
> ProBani.
> "Uri Dimant" wrote:
>
Subscribe to:
Posts (Atom)