what mysql table structure is better

Posted by Sergey on Stack Overflow See other posts from Stack Overflow or by Sergey
Published on 2010-05-16T19:55:42Z Indexed on 2010/05/16 20:00 UTC
Read the original article Hit count: 179

Filed under:
|
|
|

I have very complicated search algorithm on my site, so i decided to make a table with cache or maybe all possible results. I wanna ask what structure would be better, or maybe not the one of them? (mySQL) 1) word VARCHAR, results TEXT or BLOB where i'll store ids of found objects (for example 6 chars for each id) 2) word VARCHAR, result INT, but words are not unique now

i think i'll have about 200 000 rows in 1) with 1000-10000 ids each row or 200 000 000+ rows in 2) First way takes more storage memory but i think it would be much faster to find 1 unique row among 200 000, than 1000 rows among 200 mln non unique rows

i think about index on word column and no sphinx.

So that do YOU think?

p.s. as always, sorry for my english if it's not very good.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about search