June 19, 2013

Post: Are PHP persistent connections evil ?

…know PHPmysql” extension supported persistent connections but they were disabled… other problem with persistent connections is using too many MySQL server connections. Some people simply do… of configuration. Thousands of concurrent connections usually result from cases when there are many hundreds…

Post: GROUP_CONCAT useful GROUP BY extension

MySQL has useful extention to the GROUP BY operation: function GROUP_CONCAT: GROUP_CONCAT(expr) – This function returns a string result with the concatenated non-NULL values from a group. Where it can be useful? For example to get PHP array…, as we remove loop from PHP to MySQL server side. Also it can be handy to use result concatenated string as part of IN…

Comment: Handling big result sets

… be used as: $dbh->{‘mysql_use_result‘}=0; #disable $dbh->{‘mysql_use_result‘}=1; #enable and since mysql 4.1 server based prepares can be used with: $dbh->{‘mysql_server… documentation it is said that use_result tends to block other processes. Is this also the case with php? If Vadim has the…

Post: Shard-Query EC2 images available

…avaialble data from 1988 to 2010′; mysql> use ontime1; Database changed mysql> show table status like ‘ontime_…shards (adjust to your number of nodes) php genconfig 20 > shards.ini Running the …, called pivot_results cd shard-query/ $ ./run_query < queries.sql | tee raw |./pivot_results & [1] 12359 $ …

Post: When EXPLAIN estimates can go wrong!

…of rows reported by MySQL in the output of EXPLAIN. Now this can be a real pain as MySQL uses “the number … key_len: 1 ref: const rows: 3135918 Extra: Using index The results on 5.1 are very off, you don’…. This bug was tracked down to http://bugs.mysql.com/bug.php?id=53761 and was indeed fixed in 5….

Post: Impact of the number of idle connections in MySQL

php ./make_conn.php $numconn & cat dbt2.sql | mysql -h 10.2.2.129 -u root dbt2 sleep 120 ./run_mysql….IP of the Desktop. This script uses a PHP script, make_conn.php, to generate the idle connections. This… idle connections from a third box and the results were the exact same. The conclusion is quite …

Post: MySQL File System Fragmentation Benchmarks

… does specified number of inserts going to random tables. I used default MySQL settings for MyISAM (table_cache=64) and set innodb… following results: [root@DB10 ~]# for i in 1 10 100 1000 10000; do ./benchmark.php $i 10000000; mysql -e’drop database test1′; mysql -e… following results: [root@DB10 ~]# for i in 1 10 100 1000 10000; do ./benchmark.php $i 10000000; mysql -e’drop database test1′; mysql -e…

Post: MySQL wins C'T Database Contest

MySQL published the press release with results of Database Contest (results on German available here http://www.mysqlresults are (more orders per minute are better :) ): MySQL5/PHP

Post: SQL Injection Questions Followup

uses dynamic SQL in stored procedures extensively.  They found that it was awkward because of the limits of the procedure language MySQL… load onto their database server.  Their MySQL server became CPU-bound, while their multiple PHP application servers were often idle, waiting for… data in the database must be protected again if you use query results in a subsequent SQL query, then you should be…

Post: Shard-Query turbo charges Infobright community edition (ICE)

…. This same SQL script was used in the Shard-Query tests. For the baseline, the results and response times were captured with… the run_query.php script and the output was captured with the ‘tee’ command. $ cat one.ini [default] user=mysql db=ontime… “scale-out” results are the most striking. — Q4 SELECT Carrier, count(*) as c from ontime_fact JOIN dim_date using (date_id…