In my java project using MySql database (JDBC interface).In that database one table contains around 32 lakhs of records and that table is joining with other tables. While retrieving (fetching) data performance is degrading (to fire query taking <=2 minutes every time).So need to improve the performance time while retrieving.
is that 2 seconds for every query, even one using a unique id that is indexed?
or is that for a big query returning all rows?
could you provide an example of a select that is taking to long, with a simple table description including indexes (if a table contains 100 columns only tell us the keys and foreign keys and columns in the joins)
N>P you an a private message about an administration issue.
Every single select from the simplest to the most complicated is taking as long, that suggests to me the problem isn't in the database but in something like the network.
We can't really advise without knowing further details. As Wendy said, retrieving a single record with a unique indexed key should take a fraction of a second. As should most queries in a transactional DB, actually. For an analytical DB (like one used for OLAP) 2 minutes might be OK for certain queries. So, it depends. Tell us more.
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad: