How does SQL Relay compare to Apache::DBI or PHPs persistent database connections?
SQL Relay is more lightweight and potentially faster than Apache::DBI and is competitive in speed with PHP’s persistent connections. SQL Relay can be used to provide a connection pool to multiple machines and has more backend features than Apache::DBI or PHP. However, the DBD and PHP API’s are more full featured than the SQL Relay API’s and are generally considered to be simpler to implement. When using Apache::DBI or PHP’s persistent connections, a connection is opened to the database for every web server process. Frequently, web sites need to run large numbers of processes to provide adequate response. As the number of database connections grows, resources get strained and a lot of database connections go unused most of the time. If a website runs a mixture of Perl modules and PHP scripts, the issue can be doubled. SQL Relay makes more efficient use of resources by maintaining fewer persistent connections to the database and funnelling all database requests through those connections.