Jan Mark
Jan Mark

Reputation: 167

Will sphinx occupy the same memory space with the mysql data source?

Currently indexing my mysql database that is 135GB of data. I'm concern if after indexing it will double the data. I have two main table that needs to be index. one is about 6 millions rows and the other 10 millions rows. The data involves lost of text.

Thanks for any comment...

Upvotes: 0

Views: 225

Answers (1)

barryhunter
barryhunter

Reputation: 21091

No mysql and sphinx dont share memory.

Sphinx takes a copy of the data, to make an index. This index will use diskspace and memory.

Just like in mysql, you will use storage space for the actual data, and storage space for Indexes. (check SHOW TABLE STATUS)

Sphinx maintains an index similar to this (just does it external to mysql)

In general the index is usually smaller than the raw documents, because sphinx doesnt store the raw text just builds a inverted index. This inverted index is well suited to being stored in a compact form.

You can configured (to an extent) how much sphinx stored in memory, if memory is short, can make sphinx keep very little in RAM, the bulk of the data is on the Disk.

Upvotes: 1

Related Questions