i m searching a record from database. and it contain more than 10lac records. it take lot of time and some times mysql got crashed. how i can reduce searching time..?? does xml will be helpful in this case.?

Recommended Answers

All 6 Replies

Check the overhead of your table.. sometimes if could get a bit large if you're constantly creating/deleting things.

Also optimise your queries - do you need to run a query inside a loop of another query or can you use JOIN, also do you have primary keys defined.

Do you place LIMITS on results so that you only query the records you require?

All of these and more can help - google optimising MySQL queries.

Also I read that sorting etc is 4000% faster in PHP than in MySQL.

it is just a simple select query to search whether a mobile number exit or not... but searching criteria is very large..its more than 10lac.

try using LIMIT 1 - since this will stop the query when it reaches the first result?

Member Avatar for diafol

how to reduce time while searching

Jump out of a deep gravity well, this should speed things up quite nicely.

i got the solution through indexing.. thanks anyway

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.