Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Robert Oschler
August 25, 2005, 7:57 am
rate this thread
is not so, please tell me and point me to a doc that gives a good
explanation of MySQL's current index usage policy). I'm using MySQL 4.2.x.
Here's my dilemma.
I have two tables that have records with a FULLTEXT index text field in each
of them. The problem is the relationship between the tables is a
one-to-many relationship. I'll make some dummy info to make it easier to
describe the problem:
Table 1: "tableOne"
field: "user_info", text - FULLTEXT indexed
Table 2: "tableMany"
field: "user_comment", text - FULLTEXT indexed
There are many "tableMany.user_comment" records per "tableOne.user_info"
record. So if I want to offer a FULLTEXT search of all the across all the
"user_info" records and all the "user_comment" records, my guess is that
MySQL will reduce it to a fast FULLTEXT search of one of the tables, and
then sequentially search the second? Is that correct?
If so, with the size of my database and the number of requests per day my
server handles, I could not reasonably support that search on my server.
Any thoughts or creative ideas here?
Just to clarify my knowledge:
If I have a query like:
SELECT * FROM dummy_table WHERE MATCH(some_text_field) AGAINST ("+some
words" IN BOOLEAN MODE) AND user_id=9898989;
Then even if "some_text_field" is FULLTEXT indexed AND user_id is regular
indexed, only one of these indices will be used during the query, is that
Also, if an SQL query accesses multiple tables, like in a JOIN, does the one
index per query rule still apply? Or is it one index per table per query (I
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum