My task is to take data from different databases in different servers and to display them in a single web page.I am working in joomla and i am able to take data from the databases using separate queries for each database.But the problem is that i need to give sorting and pagination to this web page. how can i do this without making any performance issue since all the databases contains a lot of data. Or can i use a single sql query for this ??
I assume you know about having set permissions to do remote mysql. If you can, then use curl to retrieve data but will need to do one each for each server. Then sort the data on your php page into arrays and then paginate from there.
Are you trying to pull data from multiple databases with a similar table schema or data from multiple databases with different table schema? A way to speed up transfer between sites that have databases that travel over the internet (through DNS and all the routing) would be to use persistent MySQL connections in PHP. http://php.net/mysql_pconnect I'll give you some more input on what to do once my first question is answered.
If you're looking to sort and paginate from different databases, it might be useful to instead simply use PHP to retrieve the data, and parse one huge table with all the info from each database one after the other, then use one of the many fantastic Jquery table sorting and pagination plugins to do the rest.
But each of the database contains a large amount of data..each database will have like 100 entries every day and here i am using 12 databases.so if i try to take all the data from all the databases at a time and then add pagination and sorting ,it will affect the performance of the site.
Here i am using databases with similar table schema.I have 12 databases and same table is repeating in all these databases.Each database will have like 100 entries every day.i need to combine data in all these 12 tables and display it in a list.Here i am taking data from the tables using 12 separate queries for each database .i need help in adding pagination and sorting to this complete list
curl is used to retrieve data using URL , right?.so here i will have to retrieve all the data from the 12 databases separately and make it into a list. so will it make any difference.because i am able to take all the data from the databases using joomla.i am having problem with pagination and sorting.all these databases contains a lot of data, so taking all the data will take a lot of time .....