June 19, 2013

Post: MySQL Query Patterns, Optimized - Webinar questions followup

…key solution for random selection only work …a different order from what you specify…multiple columns in a compound index, then the order would matter, and it would have to match the order of columnsMySQL to scan the `title` table first, grouping by kind_id in index order.  This made the first table

Post: A case for MariaDB's Hash Joins

table built on it is greater than the join_buffer_size, then multiple hash tablesselective WHERE clause on an indexed column The SQL used for this test together with its EXPLAIN output as returned by MySQL…joining key from the table supplier would match approximately 600 rows from the table lineitem …

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

mysql: SELECT id, title, MATCH(title, body) AGAINST (‘arizona business records’ IN NATURAL LANGUAGE MODE) AS score FROMmultiple matches containing the words “James” and “Peterson”, and we should expect the record from

Post: Flexviews - part 3 - improving query performance using materialized views

table changelogs which are created by FlexCDC. The refresh algorithm computes changes in multipletables used by the above view, as stored in the data dictionary: mysql> select * from flexviews.mview_table…this column. It is used to prevent wide innodb primary keys on the MV. mysql> select

Post: Multiple column index vs multiple indexes

multiple columns: Q1 SELECT sum(length(val)) FROM T WHERE i=2 AND j=1 Q2 SELECT sum(length(val)) FROMMultiple Column index beats Index Merge in all cases when such index can be used. It is also worth to watchout a MySQL

Post: Wow. My 6 year old MySQL Bug is finally fixed in MySQL 5.6

column and I would expect “Impossible Where clause” here Lets look at query execution: | Handler_read_next | 1305742982 | mysql> select count(*) from …real application which would use multiple table and the column type was inconsistent between them… so inserts into one table would happen with …

Post: Talking MySQL to Sphinx

…tests I used the table from the forum search… couple of extra columns to result set…select max(author_id) as a ,forum_id as f from sptest where num_links=1; Empty set (2.70 sec) MySQL mysql> selectfrom Sphinx however comes from its ability to scale almost linearly using multiple CPU cores and multiple

Post: Concatenating MyISAM files

…in mysql: mysql> use test Database changed mysql> flush tables; Query OK, 0 rows affected (0.00 sec) mysql> select * from test_…, you can concatenate MyISAM files, even when multiple keys are defined. Not for everyday… 6 rows in set (0.00 sec) So varchar columns are supported without any issue but,…

Post: 3 ways MySQL uses indexes

column indexes which are used but only to their short prefix which is not very selective. A lot of this mistakes come fromMySQL uses single index – there are more complex rules of how indexes will be used if you look at multiple…(note MySQL may not select to use index for sort if you sort full table

Post: InnoDB Full-text Search in MySQL 5.6 (part 1)

TABLE, and that we might have to run OPTIMIZE TABLE multiple times if we’ve had a lot of changes to the tablemysql> set global innodb_ft_aux_table=’test/dir_test_innodb’; mysql> set global innodb_optimize_fulltext_only=1; mysql> select * from