Thursday, October 22, 2009

Dbspj + mysqld, first trials


mysql> create table T1 (a int, b int, primary key(a)) engine = ndb;
mysql> select x.a,x.b,z.a,z.b from T1 x, T1 y, T1 z where x.b=y.a and y.b=z.a;
+----+------+----+------+
| a | b | a | b |
+----+------+----+------+
| 31 | 47 | 63 | 31 |
| 63 | 31 | 47 | 63 |
| 47 | 63 | 31 | 47 |
| 5 | 47 | 63 | 31 |
+----+------+----+------+
4 rows in set (0.01 sec)


- entire query is executed with one request to data nodes
- code is only a hack (that bluntly examines mysqld's internal structures).
- list of limitations is so long that i can't write it here due to bandwidth restrictions
But still super cool!

Quote from Jan, that implemented experiment: "You can write queries that return correct result"

4 comments: