Hello Everyone

I am using 2 different database servers to retrieve my data.

Some of my query retrieve data from one database server and some from other database server.

I had made connection successfully, But there is one problem.

The problem is that when I am retrieving data it is very slow.(It takes too time to execute my query).

Is there any way or solution to retrieve data fast.

5 Years
Discussion Span
Last Post by masterjiraya

Slow retreival of data can be attributed to many reasons. Some of them are:

  1. Not using optimized query
  2. Data set that is returned is very large
  3. Slow connection

It's difficult to pinpoint the problem without having a look at your code.


Is your query using a JOIN on two servers?


Try using singleton design pattert to only have 2 connections and not connecting each time you want to run a query.

Also, you can using profiling to spot slow functions or piece of code. Lookup xdebug extention.

Edited by AminM


Show your code and queries.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.