4096 lines in the db-config.php

Hi i have installed the mu with 4096 db i feel the the file db-config.php is slowing the process

because it has 4096+ lines in it and every time the site need to connect the server need to go find the right data info from those lines and when i look into the file i see all details are the instead of the db name

add_db_server(’00’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_00′, ‘root’, ‘PASS’:wink:;

add_db_server(’01’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_01′, ‘root’, ‘PASS’:wink:;

add_db_server(’02’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_02′, ‘root’, ‘PASS’:wink:;

add_db_server(’03’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_03′, ‘root’, ‘PASS’:wink:;

add_db_server(’04’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_04′, ‘root’, ‘PASS’:wink:;

add_db_server(’05’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_05′, ‘root’, ‘PASS’:wink:;

….

….

….

add_db_server(’05’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_4096′, ‘root’, ‘PASS’:wink:;

we can make 2 variables in php and loop it to get the line we need by interring the variable value

something line

add_db_server(‘$DatabaseName’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_$DatabaseName’, ‘root’, ‘PASS’:wink:;

please help

Thanks

  • Barry
    • DEV MAN’s Mascot

    we can make 2 variables in php and loop it to get the line we need by interring the variable value

    something line

    add_db_server(‘$DatabaseName’, ‘dc1′, 1, 1,’localhost’,’localhost’, ’44centmu_$DatabaseName’, ‘root’, ‘PASS’:wink:;

    You probably could with your config, won’t work for a lot of setups though as the databases are split across servers (such as mine) – I haven’t noticed any slow down difference between 4096, 256 or 16 db setups to be honest – If you wanted to check you could record a timestamp before and after the lines to see just how long that bit of code is taking on your set up.

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    As we haven’t heard back from you we’re going to assume the problem

    was sorted out and mark this ticket as resolved.

    If it wasn’t resolved, or you have any more questions related to this

    thread please feel free to post them below and tick the ‘Mark as Not

    Resolved (re-open)’ box below the post area (or else we’ll miss it!)

    Otherwise, thanks for using the forums, and for being a member of WPMU

    DEV, it’s a pleasure to help you out and we look forward to being of

    assistance in the future.

    Thanks!