Fast database as an alternative to PHP array -
Fast database as an alternative to PHP array -
i have array containing reference variables, , in scripts need grab 1 variable or two. in current system, have include entire array (and elements) utilize 1 element. seems using database improve 2 reasons:
one record read instead of entire array variables can editedhowever, there major drawback using database: on every php run, need create connection database.
since simple database systems sqlite has no server, persistent_connection not advanced database servers mysql
.
in action,
$db = new sqlite3('mysqlitedb.db');
takes more time (and consumes more resources) than
include 'array.php';
is there solution having basic database scheme (with fast connection) replacement php array , include
file?
in other words, need simple database scheme fast connection comparable fopen
. however, cdb
incredibly fast, not fast plenty on initial connection.
by including static array file doing caching systems when pull result database. loading pre-digested result straight disk.
all database connections have overhead (certainly more including rendered file). utilize database when need operational maintainability data, comes @ cost of application overhead.
if not worried persistance of data, may want @ using caching scheme apc, memcached or redis.
php database nosql database-connection key-value
Comments
Post a Comment