Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Using separate DB connections on demand

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 554 Views
  • ImacSS
    Avatar
    Community Member
    35 Posts

    Using separate DB connections on demand Link to this post

    Not sure where else I would post this question, so posting it to general.

    Have a client who is using a heavily customized SS 2.3.2. They are running into DB performance issues and would like the ability to make all of the DB writes use one DB connection (a master db), and most/some reads use a different DB connection (a slave db).

    Basically, they would want the ability to include which db connection to use at the method call level. So for instance, DataObject::get() would become DataObject::get_using_dbconn() with an additional argument specifying the database connection to use.

    Has anyone ever had the need to do something like this with SilverStripe before? Is there support in the code base to handle this?

    If not, can anyone point me in the right direction to try and satisfy this request?

    Thanks in advance.

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts
    554 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.