June 19, 2013

Post: Alternatives of PHP ?

… XMLs into mysql database with PHP script, I was thinking about PHP alternatives. Why do I need that ? 1. PHP is slow – I’m… new – I’ve been using PHP for almost 10 years, so I want to try something else to refresh my mind. List of… problem with these languages they work as fast as PHP if believe to Shootout Benchmarks, so I’m not sure I should…

Post: PHP Large result sets and summary tables.

… use this method but this is told in PHP manual and so easy to catch. There are however more differences which may… course not. First you should consider if you need to do processing in PHP at all. Many summary tables can be built… much more efficient. Another alternative is of course to use MySQL Stored Procedures which can be fit to do this simple job. The…

Post: Caching could be the last thing you want to do

… a run-in with a very popular PHP ecommerce package which makes me want to voice a recurring mistake I see in… many cache items being invalidated at the same time? What alternative approach should be taken? Caching should be seen more as… optimizing what is necessary to meet your goals.”  – a quote from Justin’s slides on instrumentation-for-php.  In terms…

Post: Read/Write Splitting with PHP Webinar Questions Followup

… with PHP” for Percona Webinars.  If you missed it, you can still register to view the recording and my slides. Thanks to everyone… queries could scale out to slaves, because some of the data would exist only on the master. Alternatively, you can filter on… type selection per connection. It would probably makes sense to improve it to query-level. As you mentioned, many applications require different…

Comment: ORDER BY ... LIMIT Performance Optimization

… your rows you could try this for a faster alternative to RAND() (example in PHP): $var = row(“SELECT COUNT(id) FROM mytable”); $var…

Comment: Apache PHP MySQL and Runaway Scripts

PHP-FastCGI, Which is exactly environment which I found it working ? When if we stick to apache what do you propose as alternative ? To… user friendly. Though I guess you can make front server to detect and error and display nicer message.

Post: Using MMM to ALTER huge tables

… mysql> STOP SLAVE; we don’t want schema changes to be replicated to db1 now. 3. on db2: load the sql scripts… course one can just enter commands from cli, execute some php/python/ruby script or anything else. Most importantly – this must… mmm_clone is configured to do mysql snapshots, this could be a better way to achieve the same: Alternative 6. Clone db1 from…

Comment: Read/Write Splitting with PHP Webinar Questions Followup

… least PHP 5.3.6, and preferable PHP 5.4.x. I found an alternative repo at Webtatic that offers a package for PHP… suspicious. Then I tried running “make test” and PHP threw: PHP Warning: PHP Startup: Unable to load dynamic library ‘/root/mysqlnd_ms-1.4…://bugs.php.net/bug.php?id=60706 https://bugs.php.net/bug.php?id=62276 I conclude that to get mysqlnd_ms to work, one has to

Post: Content delivery system design mistakes

… of keep-alive connections. Lighttpd is often named as faster alternative. It is surely true if you server static content from… on newer Linux versions, which also can be used. Using PHP to serve files This usually comes in play if security control… is to use X-send-file or similar custom headers which make PHP script just to check restrictions and have web server to send…

Post: Cache Performance Comparison

… two baselines for comparison. First is speed of PHP Associative array. This is to show kind of peak speed possible at all… is APC alternative which supports caching user data both on disk and in shared memory. Appendinx: If you would like to repeat… all caches to work, ie query cache enabled, memcached running, apc enabled for cli mode etc. Main PHP File: global.php file with…