June 18, 2013

Post: Shard-Query EC2 images available

multiple nodes as well. Note that in the demonstration each node will contain redundant, but non-accessed data forquery script will run one more more semicolon terminated SQL statements. The queries for the benchmark are in ~ec2-user/shard-query/queries

Post: Using UNION to implement loose index scan in MySQL

… have table people with KEY(age,zip) and you will run query something like SELECT name …in all cases when it is technically possible. For multiple key part indexes MySQL will only be able to use multiple… put zip as first column in the index as it is more selective but it is good enough for

Post: PHP Large result sets and summary tables.

Tables can work for some cases in others script can be more efficient especially when multipleSELECT to the temporary table with auto_increment column and fetch data from this table using auto increment column

Post: Concatenating MyISAM files

in mysql: mysql> use test Database changed mysql> flush tables; Query OK, 0 rows affected (0.00 sec) mysql> selectin set (0.00 sec) So, yes, you can concatenate MyISAM files, even when multiple keys are defined. Not for…five | | 6 | six | +—-+——-+ 6 rows in set (0.00 sec) So varchar columns are…

Post: Multiple column index vs multiple indexes

… enough to fit in the systems memory. I’ve benchmarked simple queries using where clause which covers multiple columns: Q1 SELECT sum(length(… cardinality tables to show what difference large BETWEEN can make. Conclusion: For benchmarked queries we can see Multiple Column index beats Index Merge in

Post: ORDER BY ... LIMIT Performance Optimization

… stick to simple MySQL using multiple indexes on most selective columns would be good idea for performance of such queries. For example you may put index… for order by. Sort by column in leading table if you have JOIN with ORDER BY … LIMIT you should try hard to have sorting column

Post: Join Optimizations in MySQL 5.6 and MariaDB 5.5

… could be reading the same page multiple times into the buffer pool. So…columns participating in the join condition and then a hash table lookup is performed, on the hash tablefor highly selective queries, and obviously when the first operand used in the build step is such that the hash table fits in

Post: Multi Column indexes vs Index Merge

multiple column indexes. This is in case you’re using OR between the columns. Intable to have i1 and i2 as independent columns in this case to look at more typical case: mysql [localhost] {msandbox} (test) > explain select

Post: InnoDB Full-text Search in MySQL 5.6: Part 2, The Queries!

in the server’s error log: InnoDB: invalid column type for stopword table test/innodb_myisam_stopword. Its first columnfor example, if we change the above query to be “+james +peterson arizona” then we might expect to get back multiple

Post: Quickly finding unused indexes (and estimating their size)

in, garbage-out and you risk dropping necessary indexes. To accomplish merging multipleselect * from all_indexes\G … *************************** 33. row *************************** TABLE_SCHEMA: sakila TABLE_NAME: rental INDEX_NAME: rental_date NON_UNIQUE: 0 COLUMN_CNT: 3 COLUMN