vtiger Forum Index vtiger
The Honest Open Source CRM
 

Module-specific Database Separation
Click here to go to the original topic

 
       vtiger Forum Index -> Help - 4.x
Previous topic :: Next topic  
Author Message
sonal_b



Joined: 12 Sep 2006
Posts: 1

Posted: Tue Mar 18, 2008 11:35 am    Post subject: Module-specific Database Separation  

Hi,

We would like to have specific SELECT queries fired against a separate search server, rather than the database pointed by the default $adb object.

For this, we edited PearDatabase.php to add another instance:

$search_db = new PearDatabase($dbconfig['search_db_type'],$dbconfig['search_db_host_name'],$dbconfig['search_db_name'],$dbconfig['search_db_user_name'],$dbconfig['search_db_password']);
$search_db->connect();

In the ListView.php etc. we use this $search_db handle to fire the search queries.

However, this seems to cause some internal conflict and caused the application to completely stop responding after a couple of searches.

Are there any internal objects / services that are shared between DB instances which could have caused this conflict ?

Is there something we have missed ?

What if we downloaded the generic PearDB class and created our handle using that class instead of the normal /data/include/PearDatabase.php in vTiger ?

More background on the problem is detailed below (in case you're interested).

Would appreciate any help.

Thanks & Regards,
Sonal.

Background
========
We have a requirement where we need to run really heavy-duty (read CPU-intensive) SELECT queries against the Leads module.

When a user tries this functionality ... the application performance goes for a toss (other users are not able to even log-in). We found that the CPU usage on the server stays at 100% for sometimes upto 6 minutes in these cases.

We've optimized the queries as far as we could ... but the datasets and conditions are such that it takes time.

We would like these SELECT queries to be fired against a separate search server.
Back to top  
 
       vtiger Forum Index -> Help - 4.x
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group