Re: a question or two re fulltext queries
- From: "Hilary Cotter" <hilary.cotter@xxxxxxxxx>
- Date: Tue, 7 Feb 2006 10:00:06 -0500
1) Could you post the entire schema with indexes?
2) use set showplan_text on
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"tbh" <femdev@xxxxxxxxxxxxxxxxx> wrote in message
news:uTlE0P$KGHA.1180@xxxxxxxxxxxxxxxxxxxxxxx
hi,
i'm using SQL Server 2000 (SP3, I think).
i am looking at SQL for finding documents (table DOC) based on a couple of
criteria, one of which involves a fulltext index on a related table (TXT).
i discovered today that a less selective CONTAINS() clause:
CONTAINS (txt_stripped, 'daimler')
results in disastrous performance when I ask for the "top 10" documents
sorted by published date (a field of DOC) descending.
if I
1) include a more selective contains clause:
CONTAINS (txt_stripped, 'daimler AND mercedes')
2) omit the "top 10" (there are only125 documents total.) or
3) omit the "ORDER BY doc_pubfrom DESC" clause
the query performs fine.
i examined the query plans and discovered that in the bad case the first
thing done is to walk the doc_pubfrom index (figures, I guess: top 10
order by...). in the other cases the first thing done is the "remote scan"
of the fulltext index, which is what I want done first.
i already know how I'll solve this problem: i don't need the "top 10" at
this point -- it was just a whim while prototyping.
my questions, though for future reference:
1) is there syntax to influence SQL's query planning specifically to
prefer the full text index ?
2) is there a way to get the query plan textually? (the graphic view is
great but I wondered what I would do if I wanted to mail it or post it)
cheers,
Tim Hanson
.
- Follow-Ups:
- References:
- a question or two re fulltext queries
- From: tbh
- a question or two re fulltext queries
- Prev by Date: Re: Ignored words error strangeness
- Next by Date: Re: a question or two re fulltext queries
- Previous by thread: a question or two re fulltext queries
- Next by thread: Re: a question or two re fulltext queries
- Index(es):
Relevant Pages
|