June 18, 2013

Comment: Derived Tables and Views Performance

… would appreciate your comments on this script: taken from: http://phptechnicalgroups.blogspot.co.il/2013/05/simple-mysql-and-php-prodcuts-and-cart.html create dynamic main menu and sub menu using php and mysql php CREATE TABLE `menu… KEY (`id`)) —————————————————————————————————— $mysql=mysql_connect(’127.0.0.1′,’root’,”); mysql_select_db(‘test’,$mysql); function display_menu($parent, $level) { $result = mysql_query(“SELECT a…

Comment: MySQL and Percona Server in LinkBench benchmark

comments here don’t get stuck like that. Wonder if “too many URLs” is the spam signal but URLs for bugs.mysql….mysql.com/bug.php?id=68658 http://bugs.mysql.com/bug.php?id=68588 http://bugs.mysql.com/bug.php?id=68555 http://bugs.mysql.com/bug.php… bad, as Percona has a fix for it – http://bugs.mysql.com/bug.php?id=45892

Post: MySQL Query Cache WhiteSpace and comments

mysql> /* comment*/ select count(*) from fact where val like “%c%”; +———-+ | count(*) | +———-+ | 0 | +———-+ 1 row in set (0.00 sec) mysql> /* another comment

Post: Apache PHP MySQL and Runaway Scripts

… unfortunately very serious limitation in practice when you’re using MySQL with PHP as you can have single runaway query which takes… open another MySQL connection to kill the query which was running (otherwise query may well continue to run even if PHP script is aborted). UPDATE: There are some comments saying experimenting with sleep() function is wrong and if I would use real MySQL

Post: mk-query-digest, query comments and the query cache

… fact that MySQL allows you to embed comments into SQL statements. These comments are extremely convenient, because they are written into MySQL log files… formatted SQL comment. This information can then be cross-referenced between MySQL logs and Apache logs. select 1 — File: myfile.php Line: 25…

Post: SQL Injection Questions Followup

…: http://pragprog.com/book/bksqla/sql-antipatterns Jonathan C. also commented: Q: My preferred variable parameter format: bug_id IN (?” . str… load onto their database server.  Their MySQL server became CPU-bound, while their multiple PHP application servers were often idle, waiting for…

Post: Debugging sleeping connections with MySQL

… stack trace originated from php stream functions not from libmysql or memcache.so, which means it is not MySQL or memcache connections… process are not only helpful to debug sleeping connections with MySQL but many other cases when you see web application locking… which could be helpful in this regard would appreciate your comments. There might be some smarter tools out where for production…

Post: Using Flexviews - part two, change data capture

… appropriate changes. The file is well commented. The example settings file should work for most MySQL installations which allow connections as root… capture the initial binary log position. php ./setup_flexcdc.php –ini consumer.ini $ php setup_flexcdc.php setup starting setup completed If the setup…

Post: Shard-Query EC2 images available

…` (`AirlineID`,`Carrier`), KEY `Carrier` (`Carrier`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=’Contains information on flights, and what airline offered those flights…=InnoDB DEFAULT CHARSET=latin1 COMMENT=’Contains all avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status like… config for 20 shards (adjust to your number of nodes) php genconfig 20 > shards.ini Running the test For best performance…

Post: Read/Write Splitting with PHP Webinar Questions Followup

… a presentation on “Read/Write Splitting with PHP” for Percona Webinars.  If you missed it, …Even the official manual page for MySQL Proxy 0.8.2 still says: “MySQL Proxy is currently an …my prototype to use hints embedded in SQL comments, instead of instantiating different wrapper classes. Q: Does…