MySQL Forums
Forum List  »  Optimizer & Parser

Index on difference of two columns
Posted by: Marty -
Date: April 08, 2007 09:31AM

Hello,

I have a table where is stored position of a word in a text and i would like to create an index on difference between positions of every two words in the same text.

This index would increase speed of my queries, because I have a condition in my sql statement like this: WHERE tab1.position - tab2.position < 15 (generally a difference; tab1 and tab2 are actually the same table that is described below)

table looks like this:

id int auto_increment,
word varchar(30),
position smallint,
id_article smallint,
primary key(id)

Thank you for any reply

Options: ReplyQuote


Subject
Views
Written By
Posted
Index on difference of two columns
3522
April 08, 2007 09:31AM
2082
April 12, 2007 12:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.