Author - Alexander Rubin

Nondeterministic Functions in MySQL (i.e. rand) Can Surprise You

MySQL non deterministic functions rand

Working on a test case with sysbench, I encountered this:

MySQL

mysql> select * from sbtest1 where id = round(rand()*10000, 0);
+——+——–+————————————————————————————————————————-+————————————————————-+
| id | k | c […]

Read more

One Billion Tables in MySQL 8.0 with ZFS

one billion tables MySQL

The short version
I created > one billion InnoDB tables in MySQL 8.0 (tables, not rows) just for fun. Here is the proof:

MySQL

$ mysql -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1425329
Server version: 8.0.12 MySQL Community Server – GPL

Copyright (c) 2000, 2018, Oracle and/or its […]

Read more

Upcoming Webinar Thurs 9/27: Best Practices Using Indexes in MongoDB

Best Practices Using Indexes in MongoDB

Please join Percona’s Principal Architect Alex Rubin as he presents Best Practices Using Indexes in MongoDB on Thursday, September 27th at 11:00 AM PDT (UTC-7) / 2:00 PM EDT (UTC-4).
Register Now
 
Indexes support the efficient execution of queries in MongoDB. Without indexes, MongoDB must perform a collection scan, i.e. scan every document in a collection, […]

Read more

Using AWS EC2 instance store vs EBS for MySQL: how to increase performance and decrease cost

AWS EC2 MySQL cost savings

If you are using large EBS GP2 volumes for MySQL (i.e. 10TB+) on AWS EC2, you can increase performance and save a significant amount of money by moving to local SSD (NVMe) instance storage. Interested? Then read on for a more detailed examination of how to achieve cost-benefits and increase performance from this implementation.
EBS […]

Read more

Why MySQL Stored Procedures, Functions and Triggers Are Bad For Performance

Execution map for func1()

MySQL stored procedures, functions and triggers are tempting constructs for application developers. However, as I discovered, there can be an impact on database performance when using MySQL stored routines. Not being entirely sure of what I was seeing during a customer visit, I set out to create some simple tests to measure the impact […]

Read more

How to Set Up Replication Between AWS Aurora and an External MySQL Instance

Amazon RDS Aurora replication to external server

Amazon RDS Aurora (MySQL) provides its own low latency replication. Nevertheless, there are cases where it can be beneficial to set up replication from Aurora to an external MySQL server, as Amazon RDS Aurora is based on MySQL and supports native MySQL replication. Here are some examples of when replicating from Amazon RDS Aurora […]

Read more

What To Do When MySQL Runs Out of Memory: Troubleshooting Guide

MySQL memory troubleshooting

Troubleshooting crashes is never a fun task, especially if MySQL does not report the cause of the crash. For example, when MySQL runs out of memory. Peter Zaitsev wrote a blog post in 2012: Troubleshooting MySQL Memory Usage with a lots of useful tips. With the new versions of MySQL (5.7+) and performance_schema we have […]

Read more

MongoDB Transactions: Your Very First Transaction with MongoDB 4.0

MongoDB 4.0 transactions

MongoDB 4.0 is just around the corner and with rc0 we can get a good idea of what we can expect in the GA version. MongoDB 4.0 will allow transactions to run in a replica set and, in a future release, the MongoDB transaction will work for sharded clusters. This is a really big change!
Multi-statement […]

Read more