i have a lot of mysql data (2 Lakhs data) how to collect data with in a seconds ? any idea

thanks in advance

Recommended Answers

All 5 Replies

If you run explain table_name in your mysql client and paste the output together with an example of data maybe we can give you a hand. And also paste the query.

put indexes on the columns that you use in the where clause

Member Avatar

In addition to the suggestions:

Using LIMIT clause may speed things up if you're after a specific number of records. Avoiding the '*' for return fields and naming the exact fields you want to return should also speed things up.
Using JOINS instead of subqueries where possible.

SELECT * FROM table_name WHERE start_date="$st_date" AND end_date="$en_date";

I hope you are having start_date and end_date fields in your Table....:)

Member Avatar

2 Lakhs

Are we talking 200,000 (or 2,00,000 in Asian num)? So you're saying that you have a long-ish table? Please post your query. We can't help properly if you don't provide this info.

Be a part of the DaniWeb community

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