Re: Difficulty in implementing
From: Hilary Cotter (hilary.cotter_at_gmail.com)
Date: 10/26/04
- Next message: Hilary Cotter: "Re: Removing duplicate dat"
- Previous message: John Kane: "Re: Re: Word breakers and "special" characters"
- In reply to: Shabam: "Re: Difficulty in implementing"
- Next in thread: John Kane: "Re: Difficulty in implementing"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 25 Oct 2004 20:41:44 -0400
The textual content in the parent table will make the "table wider". If this
textual column is involved in other queries, storing it in a child table
will require the use of a join and you will not get performance
improvements. However, if this textual column is not used in most queries or
to resolve queries, you will get better performance by storing it in a child
table, as your remaining parent table will be considerably narrower and
hence more rows can be stored per database page. Consequently SQL Server
will have to go to disk less to return pages.
Also when you are doing a ContainsTable or FreeTextTable query, you can join
on the parent table and not have to query the child table directly at all.
Depending on the number of rows and the size of your tables the performance
improvement can by huge.
If everytime you need to display a record you have to return the contents on
this field, it probably should be in the parent.
You will have to test to see what works best for you. In my experience on
most of the search applications I have worked on, splitting your textual
data which you are indexing into a seperate table is a must. Your results
may vary.
"Shabam" <blislecp@hotmail.com> wrote in message
news:vIidnfVIBYAy5eDcRVn-3A@adelphia.com...
> > First you need to create a catalog and build the index for the column
you
> > wish to index.
> >
> > Then you add a contains or freetext clause to your where query, ie:
> >
> > select col1, col2, col3 from tablename where contains(IndexedColumnName,
> > 'SearchPhrase').
> >
> > For performance reasons you will want to limit your results set and use
> > ContainsTable, and possibly put your data you are indexing in a child
> table.
>
> Why should the data be put in a child table? How does that help with
> performance?
>
> Right now, I have a "Users" table. It contains various profile fields.
> Some of the fields contain comma-delimited list items (hobbies, separated
by
> commas). When viewing the user's profile, these hobby items are displayed
> and linked to a search, item by item.
>
> I suggested to the programmer it would be much better to put the
individual
> hobby items in a separate table, linked with an index of the user ID.
> However he's saying it would cause more overhead during the display of the
> user profile page. What are your thoughts? (I know this is a tangeant
from
> the original question).
>
>
>
- Next message: Hilary Cotter: "Re: Removing duplicate dat"
- Previous message: John Kane: "Re: Re: Word breakers and "special" characters"
- In reply to: Shabam: "Re: Difficulty in implementing"
- Next in thread: John Kane: "Re: Difficulty in implementing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|