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.

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.

Member Avatar
diafol

Is your query using a JOIN on two servers?

Is your query using a JOIN on two servers?
No

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.

Member Avatar
diafol

Show your code and queries.

yeah a bunch of us can help you alot. Do some normalization stuff