Databases Reference
In-Depth Information
There's nothing surprising here. There are six rows in the table.
mysql> select * from information_schema.cond_push where text='test';
+--------+------+
| NUMBER | TEXT |
+--------+------+
| 1 | test |
+--------+------+
1 row in set (0.00 sec)
Yes! Note that condition pushdown worked—we have put only one single row in the
table! Compare this to the result without condition pushdown:
mysql> select * from information_schema.cond_push where
concat(text)='test';
+--------+------+
| NUMBER | TEXT |
+--------+------+
| 6 | test |
+--------+------+
1 row in set (0.00 sec)
In this case the plugin has put all six rows in the table and MySQL has filtered out
the first five. We can use more complex conditions too:
mysql> select * from information_schema.cond_push where text='test' and
rand()<2;
+--------+------+
| NUMBER | TEXT |
+--------+------+
| 1 | test |
+--------+------+
1 row in set (0.00 sec)
As expected, adding more conditions with AND does not stop condition pushdown.
mysql> select * from information_schema.cond_push where
text=concat('te','st');
+--------+------+
| NUMBER | TEXT |
+--------+------+
| 1 | test |
+--------+------+
1 row in set (0.00 sec)
 
Search WWH ::




Custom Search