9. About aurora
1. Volume level sync among the cluster node.
2. Has it's own AZ of the volume in a different zone.
3. The writer supports read and writes. Reader supports only reads.
4. Up to 15 read replica is supported.
5. Automated failure when the writer is down.
10. About aurora
6. Dynamic disk adjustment.
7. Aurora storage is also self-healing.
8. Auto-scaling of the reader.
9. Low-Latency Read Replicas.
10. Custom endpoint with autoscaling.
17. Use cases
1. Better with query with equal, in, range.
2. More optimised for analytical queries.
3. Reduced IOPS and CPU utilisation.
4. Uniform load sharing.
24. Lab Environment
Instance type r3.large
Aurora version 2.09
MySQL version 5.7
Table size 255 GB
Record creation sysbench
25. Test case
Without parallel query
mysql> explain select count(id) from sbtest1 where id > 12345 and k < 6789;
+----+-------------+---------+------------+-------+---------------+---------+---------+------+-----------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+---------+------------+-------+---------------+---------+---------+------+-----------+----------+-------------+
| 1 | SIMPLE | sbtest1 | NULL | range | PRIMARY | PRIMARY | 4 | NULL | 654698147 | 33.33 | Using where |
+----+-------------+---------+------------+-------+---------------+---------+---------+------+-----------+----------+-------------+
1 row in set, 1 warning (0.00 sec)
With parallel query
mysql> explain select count(id) from sbtest1 where id > 12345 and k < 6789;
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra
|
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
| 1 | SIMPLE | sbtest1 | NULL | ALL | PRIMARY | NULL | NULL | NULL | 1309396294 | 16.66 | Using where; Using parallel query (2 columns, 2 filters, 0
exprs; 0 extra) |
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
1 row in set, 1 warning (0.00 sec)
Explain plan
26. Test case
Explain Extra option
Columns No.of column in the query.
Filters
No.of column in where clause with
equal, not-equal, range.
Exprs
Column with function or operator , that
can proceed by the parallel query.
Extra
Number of expression that cannot be
proceed by parallel query.
27. Performance Analysis
Without parallel query
mysql> select sql_no_cache sum(k) from sbtest1 where upper(k)=231212 and upper(c) is not null;
+--------+
| sum(k) |
+--------+
| NULL |
+--------+
1 row in set (2 hours 33 min 22.40 sec)
With parallel query
mysql> select sql_no_cache sum(k) from sbtest1 where upper(k)=231212 and upper(c) is not null;
+--------+
| sum(k) |
+--------+
| NULL |
+--------+
1 row in set (1 min 6.61 sec)
With function
32. Test case ( using eq Ref )
Without parallel query
mysql> explain select sql_no_cache count(*) from sbtest1 where k=7256238746;
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+-------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+-------------+
| 1 | SIMPLE | sbtest1 | NULL | ALL | NULL | NULL | NULL | NULL | 1205294616 | 10.00 | Using where |
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+-------------+
1 row in set, 1 warning (0.00 sec)
With parallel query
mysql> explain select count(*) from sbtest1 where k=7256238746;
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra
|
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
| 1 | SIMPLE | sbtest1 | NULL | ALL | NULL | NULL | NULL | NULL | 1205294616 | 10.00 | Using where; Using parallel query (1 columns, 0 filters, 1
exprs; 0 extra) |
+----+-------------+---------+------------+------+---------------+------+---------+------+------------+----------+----------------------------------------------------------------
------------+
1 row in set, 1 warning (0.01 sec)
Explain plan
33. Performance
Without parallel query
mysql> select sql_no_cache count(*) from sbtest1 where k=7256238746;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (2 hours 25 min 9.11 sec)
With parallel query
mmysql> select count(*) from sbtest1 where k=7256238746;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (2 min 12.22 sec)
45. Performance Summary
Without parallel Query With parallel query
Function 2 hrs 33 mins 1 min
Eq Ref 2 hrs 25 mins 2 mins
Join condition 10 mins 2 mins
47. Limitation
1.Row format should not be compressed. Supports only dynamic
2. Won't work for smaller tables.
3. Limited number of parallel query execution.
4. Aurora version should > 2.09.