search error

sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

search error

Post by sourceuno »

Can you suggest a better way of being able to sort by this field without having it in the index? Should I create a separate index for this field?
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

search error

Post by sourceuno »

I created a metamorph inverted index without the SiteURL field in it and the query works fine when ordering by SiteURL. Is the benefit of having it in the index to mainly speed up the query?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

search error

Post by John »

The benefit of having data in the metamorph index is to speed up the ORDER BY by having the data to hand while searching the index, rather than needing to read all the matching records to get the sort keys. By having large fields in the index you would be reading the additional data for all text searches, and probably excessive data for most of the searches ordered by SiteURL. For that reason the fields are intended to be used for small fixed size data items such as dates and integers, and it will display a warning message about varchars.
John Turnbull
Thunderstone Software
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

search error

Post by sourceuno »

Is there an alternate way of sorting by SiteURL instead of including it in the metamorph index?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

search error

Post by John »

Texis will still do the ORDER BY if you specify it. You might want to consider putting the Body data in a BLOB, which may reduce the size of the table so that you regain most of the efficiencies of only reading small amounts of data.
John Turnbull
Thunderstone Software
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

search error

Post by sourceuno »

I'm trying to find a way to still sort on SiteURL and include it in the index to speed up the query. Is it possible to include a partial field in the metamorph index, maybe including the 1st 10 characters of the SiteURL?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

search error

Post by John »

Defining the field as varchar(10) will include the first 10 characters or so in the index, and it will sort on those 10 characters.
John Turnbull
Thunderstone Software
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

search error

Post by sourceuno »

In your previous message, you mentioned that putting the Body data in a BLOB would help. I'm already putting that field in a BLOB. Did you mean to put the SiteURL in a BLOB?

When I had the SiteURL as a shorter field, I had problems updating data in that field if it was longer than the defined length. Is this supposed to happen?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

search error

Post by John »

No, I didn't know the Body was already a BLOB. SiteURL should not be a BLOB.

There shouldn't be any problems updating data that is longer than the defined length. What sort of problems did you see?
John Turnbull
Thunderstone Software
Post Reply