budimir Posted July 11, 2014 Share Posted July 11, 2014 Guys, I'need help. How can I get data records from DB in blocks (of about 100 pcs at one block). I have large table with 100.000+ rows in Db, but it's taking a lot of time to get that data. My idea is to get 100 rows and than click on a button and than get another 100 rows. I have implemented paging but it's still to slow. Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted July 11, 2014 Share Posted July 11, 2014 Have you tried using the LIMIT clause? Note that you can use it to select a range. http://www.mysqltutorial.org/mysql-limit.aspx Quote Link to comment Share on other sites More sharing options...
Barand Posted July 11, 2014 Share Posted July 11, 2014 Define "too slow". Are you saying it takes over 1 second? Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 11, 2014 Share Posted July 11, 2014 It would be helpful to see the logic you are using to get a page of records and output it to the page (including the queries). It could be you are running queries in loops, the query you are using is inefficient, or you need to add indexes on specific fields used in the query. (or a combination of the three). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.