Hi,
I'm looking to index my db-driven ASP.NET website to drive a search
feature. I would like to know if there is a way to give greater weight
to search terms when they appear in the page's headers. In other words
if my search term was "foo", the following instance:
<h1>Foo</h1>
would have more weight than
<p>Foo</p>
I'm obviously looking for greater, more granular control of the rank
of pages that are returned by my fulltext query, so if anyone could
point me in the right direction or to some resource that would help me
out, I'd be extremely grateful!
Regards,
ChrisHi Chris
"hardieca@.hotmail.com" wrote:
> Hi,
> I'm looking to index my db-driven ASP.NET website to drive a search
> feature. I would like to know if there is a way to give greater weight
> to search terms when they appear in the page's headers. In other words
> if my search term was "foo", the following instance:
> <h1>Foo</h1>
> would have more weight than
> <p>Foo</p>
> I'm obviously looking for greater, more granular control of the rank
> of pages that are returned by my fulltext query, so if anyone could
> point me in the right direction or to some resource that would help me
> out, I'd be extremely grateful!
> Regards,
> Chris
>
I don't know of a way out of the box although I am not a FT expert! I guess
you could roll your own and separate key words from the headers/body and
store them in a table.
John
Showing posts with label drive. Show all posts
Showing posts with label drive. Show all posts
Monday, March 12, 2012
Indexing an ASP.NET web application
Hi,
I'm looking to index my db-driven ASP.NET website to drive a search
feature. I would like to know if there is a way to give greater weight
to search terms when they appear in the page's headers. In other words
if my search term was "foo", the following instance:
<h1>Foo</h1>
would have more weight than
<p>Foo</p>
I'm obviously looking for greater, more granular control of the rank
of pages that are returned by my fulltext query, so if anyone could
point me in the right direction or to some resource that would help me
out, I'd be extremely grateful!
Regards,
ChrisHi Chris
"hardieca@.hotmail.com" wrote:
> Hi,
> I'm looking to index my db-driven ASP.NET website to drive a search
> feature. I would like to know if there is a way to give greater weight
> to search terms when they appear in the page's headers. In other words
> if my search term was "foo", the following instance:
> <h1>Foo</h1>
> would have more weight than
> <p>Foo</p>
> I'm obviously looking for greater, more granular control of the rank
> of pages that are returned by my fulltext query, so if anyone could
> point me in the right direction or to some resource that would help me
> out, I'd be extremely grateful!
> Regards,
> Chris
>
I don't know of a way out of the box although I am not a FT expert! I guess
you could roll your own and separate key words from the headers/body and
store them in a table.
John
I'm looking to index my db-driven ASP.NET website to drive a search
feature. I would like to know if there is a way to give greater weight
to search terms when they appear in the page's headers. In other words
if my search term was "foo", the following instance:
<h1>Foo</h1>
would have more weight than
<p>Foo</p>
I'm obviously looking for greater, more granular control of the rank
of pages that are returned by my fulltext query, so if anyone could
point me in the right direction or to some resource that would help me
out, I'd be extremely grateful!
Regards,
ChrisHi Chris
"hardieca@.hotmail.com" wrote:
> Hi,
> I'm looking to index my db-driven ASP.NET website to drive a search
> feature. I would like to know if there is a way to give greater weight
> to search terms when they appear in the page's headers. In other words
> if my search term was "foo", the following instance:
> <h1>Foo</h1>
> would have more weight than
> <p>Foo</p>
> I'm obviously looking for greater, more granular control of the rank
> of pages that are returned by my fulltext query, so if anyone could
> point me in the right direction or to some resource that would help me
> out, I'd be extremely grateful!
> Regards,
> Chris
>
I don't know of a way out of the box although I am not a FT expert! I guess
you could roll your own and separate key words from the headers/body and
store them in a table.
John
Indexing an ASP.NET web application
Hi,
I'm looking to index my db-driven ASP.NET website to drive a search
feature. I would like to know if there is a way to give greater weight
to search terms when they appear in the page's headers. In other words
if my search term was "foo", the following instance:
<h1>Foo</h1>
would have more weight than
<p>Foo</p>
I'm obviously looking for greater, more granular control of the rank
of pages that are returned by my fulltext query, so if anyone could
point me in the right direction or to some resource that would help me
out, I'd be extremely grateful!
Regards,
Chris
Hi Chris
"hardieca@.hotmail.com" wrote:
> Hi,
> I'm looking to index my db-driven ASP.NET website to drive a search
> feature. I would like to know if there is a way to give greater weight
> to search terms when they appear in the page's headers. In other words
> if my search term was "foo", the following instance:
> <h1>Foo</h1>
> would have more weight than
> <p>Foo</p>
> I'm obviously looking for greater, more granular control of the rank
> of pages that are returned by my fulltext query, so if anyone could
> point me in the right direction or to some resource that would help me
> out, I'd be extremely grateful!
> Regards,
> Chris
>
I don't know of a way out of the box although I am not a FT expert! I guess
you could roll your own and separate key words from the headers/body and
store them in a table.
John
I'm looking to index my db-driven ASP.NET website to drive a search
feature. I would like to know if there is a way to give greater weight
to search terms when they appear in the page's headers. In other words
if my search term was "foo", the following instance:
<h1>Foo</h1>
would have more weight than
<p>Foo</p>
I'm obviously looking for greater, more granular control of the rank
of pages that are returned by my fulltext query, so if anyone could
point me in the right direction or to some resource that would help me
out, I'd be extremely grateful!
Regards,
Chris
Hi Chris
"hardieca@.hotmail.com" wrote:
> Hi,
> I'm looking to index my db-driven ASP.NET website to drive a search
> feature. I would like to know if there is a way to give greater weight
> to search terms when they appear in the page's headers. In other words
> if my search term was "foo", the following instance:
> <h1>Foo</h1>
> would have more weight than
> <p>Foo</p>
> I'm obviously looking for greater, more granular control of the rank
> of pages that are returned by my fulltext query, so if anyone could
> point me in the right direction or to some resource that would help me
> out, I'd be extremely grateful!
> Regards,
> Chris
>
I don't know of a way out of the box although I am not a FT expert! I guess
you could roll your own and separate key words from the headers/body and
store them in a table.
John
Indexing
I have a 25gb database. one of the tables has 45Million
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.
Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.
|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
a
>
>.
>
|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...[vbcol=seagreen]
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> you don't use index
> the statistics of
> message
> a
|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.
Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.
|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
a
>
>.
>
|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...[vbcol=seagreen]
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> you don't use index
> the statistics of
> message
> a
|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
Friday, March 9, 2012
Indexing
I have a 25gb database. one of the tables has 45Million
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
a[vbcol=seagreen]
>
>.
>|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...[vbcol=seagreen]
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> you don't use index
> the statistics of
> message
> a|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
a[vbcol=seagreen]
>
>.
>|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...[vbcol=seagreen]
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> you don't use index
> the statistics of
> message
> a|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
Indexing
I have a 25gb database. one of the tables has 45Million
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
>> I have a 25gb database. one of the tables has 45Million
>> rows. It is located on a datafile all on its own and on
a
>> seperate drive. Now I have 7 indexes one of which is a
>> cluster. Can some one please tell me why every query run
>> defaults to the clustered index. Is there a bug or what.
>> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>> Thanks inadvace.
>
>.
>|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> >--Original Message--
> >Query Optimizer selects proper index to every query if
> you don't use index
> >hint.
> >I think you may check the query plans of all queries and
> the statistics of
> >non-clustered indexes.
> >
> >Hanky
> >
> >
> >"Ryan" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> >> I have a 25gb database. one of the tables has 45Million
> >> rows. It is located on a datafile all on its own and on
> a
> >> seperate drive. Now I have 7 indexes one of which is a
> >> cluster. Can some one please tell me why every query run
> >> defaults to the clustered index. Is there a bug or what.
> >>
> >> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> >> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> >>
> >> Thanks inadvace.
> >
> >
> >.
> >|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
> >I have a 25gb database. one of the tables has 45Million
> >rows. It is located on a datafile all on its own and on a
> >seperate drive. Now I have 7 indexes one of which is a
> >cluster. Can some one please tell me why every query run
> >defaults to the clustered index. Is there a bug or what.
> >
> >System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> >enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> >
> >Thanks inadvace.
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
rows. It is located on a datafile all on its own and on a
seperate drive. Now I have 7 indexes one of which is a
cluster. Can some one please tell me why every query run
defaults to the clustered index. Is there a bug or what.
System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
Thanks inadvace.Query Optimizer selects proper index to every query if you don't use index
hint.
I think you may check the query plans of all queries and the statistics of
non-clustered indexes.
Hanky
"Ryan" <anonymous@.discussions.microsoft.com> wrote in message
news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> I have a 25gb database. one of the tables has 45Million
> rows. It is located on a datafile all on its own and on a
> seperate drive. Now I have 7 indexes one of which is a
> cluster. Can some one please tell me why every query run
> defaults to the clustered index. Is there a bug or what.
> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> Thanks inadvace.|||I dont use hints and the stats are updated regularly but
still it uses the cluster, which is not the optimal index.
>--Original Message--
>Query Optimizer selects proper index to every query if
you don't use index
>hint.
>I think you may check the query plans of all queries and
the statistics of
>non-clustered indexes.
>Hanky
>
>"Ryan" <anonymous@.discussions.microsoft.com> wrote in
message
>news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
>> I have a 25gb database. one of the tables has 45Million
>> rows. It is located on a datafile all on its own and on
a
>> seperate drive. Now I have 7 indexes one of which is a
>> cluster. Can some one please tell me why every query run
>> defaults to the clustered index. Is there a bug or what.
>> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>> Thanks inadvace.
>
>.
>|||Could you inform me the query plan on option 'set showplan_all on' and the
result of 'exec sp_helpindex TableName'?
<anonymous@.discussions.microsoft.com> wrote in message
news:4a5c01c48047$5290ef40$a501280a@.phx.gbl...
> I dont use hints and the stats are updated regularly but
> still it uses the cluster, which is not the optimal index.
> >--Original Message--
> >Query Optimizer selects proper index to every query if
> you don't use index
> >hint.
> >I think you may check the query plans of all queries and
> the statistics of
> >non-clustered indexes.
> >
> >Hanky
> >
> >
> >"Ryan" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:45f601c4801a$06c252c0$a301280a@.phx.gbl...
> >> I have a 25gb database. one of the tables has 45Million
> >> rows. It is located on a datafile all on its own and on
> a
> >> seperate drive. Now I have 7 indexes one of which is a
> >> cluster. Can some one please tell me why every query run
> >> defaults to the clustered index. Is there a bug or what.
> >>
> >> System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> >> enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> >>
> >> Thanks inadvace.
> >
> >
> >.
> >|||On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
>I have a 25gb database. one of the tables has 45Million
>rows. It is located on a datafile all on its own and on a
>seperate drive. Now I have 7 indexes one of which is a
>cluster. Can some one please tell me why every query run
>defaults to the clustered index. Is there a bug or what.
>System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
>enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
>Thanks inadvace.
Hi Ryan,
Are the queries using ONLY the clustered index, or arre they using the
clustered index in addition to one or more of the other indexes? I think
it's the latter.
The clustered index defines how the data in the table is physically
organised. All non-clustered indexes combine the data from the index
columns with the corresponding data in the clustered index. That data is
then used to locate the row. A non-clustered index will never be used on
it's own, but always in combination with the clustered index (unless all
rows requested are in either the index or the clustered index; in that
case there's no need to locate the rest of the data).
If you run the following query with the option to show the execution plan,
you'll see (checking the plan from right to left) that an index seek on
the non-clustered index is used to find the rows matching the where
clause, followed by a bookmark lookup on the clustered index to return the
whole row.
use pubs
go
select * from authors
where au_lname = 'White'
and au_fname = 'Johnson'
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks,
Hugo
"Hugo Kornelis" wrote:
> On Wed, 11 Aug 2004 20:11:14 -0700, Ryan wrote:
> >I have a 25gb database. one of the tables has 45Million
> >rows. It is located on a datafile all on its own and on a
> >seperate drive. Now I have 7 indexes one of which is a
> >cluster. Can some one please tell me why every query run
> >defaults to the clustered index. Is there a bug or what.
> >
> >System is WIN2K ADV ED with 8Gb RAM Quad 4.2 Xeon AWE
> >enabled. 7GB allocated to SQL. SQL 2000 ENT ED both SP3
> >
> >Thanks inadvace.
> Hi Ryan,
> Are the queries using ONLY the clustered index, or arre they using the
> clustered index in addition to one or more of the other indexes? I think
> it's the latter.
> The clustered index defines how the data in the table is physically
> organised. All non-clustered indexes combine the data from the index
> columns with the corresponding data in the clustered index. That data is
> then used to locate the row. A non-clustered index will never be used on
> it's own, but always in combination with the clustered index (unless all
> rows requested are in either the index or the clustered index; in that
> case there's no need to locate the rest of the data).
> If you run the following query with the option to show the execution plan,
> you'll see (checking the plan from right to left) that an index seek on
> the non-clustered index is used to find the rows matching the where
> clause, followed by a bookmark lookup on the clustered index to return the
> whole row.
> use pubs
> go
> select * from authors
> where au_lname = 'White'
> and au_fname = 'Johnson'
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
Subscribe to:
Posts (Atom)