Concerning the use of realtime index in SPhinX

Source: Internet
Author: User

Why do we need to study Real-Time Indexes when we have complete indexes and incremental indexes?

1. The complete index is executed once every night at idle time. It takes a long time, but the problem is not big. I/O is slow and the CPU is tired, but no one uses the platform in that time period, such as AM.

2. incremental index: at present, we need to add resources in the list immediately. There are two problems. The first one is that we use Asynchronous writing to the database queue, it is not guaranteed to be written here, so it must be written to the database immediately.

The second is that even if the data is written to the database, the interval between our incremental indexes is 2 seconds, plus the time when the real index is generated, such as 0.5 seconds, that is to say, after writing data to the database, it takes 2.5 of the time to ensure that the user can see it. We need to display the progress bar in the storage on the interface, which is sometimes unpleasant. What should we do? For example, for asynchronous writing to a queue, we can open multiple queues, such as four queue monitors and write data to the database at the same time. These are four threads of concurrent writing, which can certainly increase the write speed, in addition, there are not many four, and MySQL can also survive. Even if the four are not enough, you can also adopt the multi-master write solution later. Writing is not the main problem. But the incremental index is re-built in 2 seconds, so it cannot be re-built in 0.1 seconds, right?

At this time, the study of real-time indexing makes sense:

1. How does real-time indexing work? What is the principle?
2. How to configure real-time indexes and do a good job of testing.
3. What problems does real-time index have? How should we deal with it?
4. Do we need to convert our current incremental indexes into real-time indexes? Or is the result still immature in real time, so it is not suitable for transferring in?

Reference link:
HTTP://Blog.sina.com.cn/s/blog_54ef398901017u820.html

 

Concerning the use of realtime index in SPhinX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.