Skip to content

Instantly share code, notes, and snippets.

@MuhammadJamaluddin
Last active June 11, 2019 19:06
Show Gist options
  • Save MuhammadJamaluddin/a9fe65353b5a3f5e79088eaf64b4edb9 to your computer and use it in GitHub Desktop.
Save MuhammadJamaluddin/a9fe65353b5a3f5e79088eaf64b4edb9 to your computer and use it in GitHub Desktop.
Insert operations:
id --> performance
10,000,000 --> Query OK, 1 row affected (0.35 sec)
10,000,001 --> Query OK, 1 row affected (0.10 sec)
10,000,002 --> Query OK, 1 row affected (0.05 sec)
10,000,003 --> Query OK, 1 row affected (0.06 sec)
mysql> UPDATE books
-> SET author='Jamal'
-> WHERE id=10000;
Query OK, 1 row affected (0.20 sec)
mysql> UPDATE books
-> SET author='Jamal'
-> WHERE id=3340000;
Query OK, 1 row affected (0.16 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment