I recently had a problem.....which i want to discuss with you......
I am using single table concept in my database. since i am using single table i need to retrieve 11 values from the DB to form a single record. And i had 1 lakh records that means i need to retrieve 11 lakh values and form the records by looping which is so so expensive. And i am using jquery data table to display, which will take minimum of 10 seconds to load 1000 records so think about loading 1 lakh records will it load in 30 minutes definitely not it will make server to hang then everything slows down to dead. So we used flat file concept with json array to populate it with my additional functionalities like
1. Own Pagination.
2. Loading latest 100 records first and the remaining with our pagination.
3. Used own parser to parse the json data because json itself has some issues like maximum depth and importantly incompatibility with old php versions. (the json_decode function returns error by i cant find it where because i am using php5.2.6 which doesn't support json's last error) and also this project is developed 2 years back and has 400 MB of data so the transformation to the latest version is nearly impossible because every second data is coming from different sources from mobile app, mobile SMS, Web.
We solved this using our own concepts which i explained think of what, the performance is really great it took 2 to 4 seconds to load.
Its really a great experience for me.
No comments:
Post a Comment