Quote:
I have a database that contains 300 K records, who can give me some suggetion about how to improve the search performance.
|
(1) Fields that are going to be searched-on frequently, by a particular value or range of values, should be indexed. These fields do not need to be the only fields that are searched; only "enough to reduce the number of candidate records from 300,000 to a few thousand." The tradeoff is that each index must be maintained for every insert/edit/delete that occurs.
(2) For text-fields, full-text indexing in MySQL works very well.
(3) Examine the queries that you are issuing. Examine the query-plans ("how MySQL plans to do the work"). Often you will find that a slight revision to a query greatly improves (or degrades) its performance.
"300,000 records" qualifies as a "moderately sized" database. It's large enough to reveal some inefficiencies. But it's no "strain" for MySQL.