when we want to use anonymized data for performance tuning purpose, we don't want to change data cardinality in records, otherwise, it is not showing the correct sql execution plan.
grammar
pass with digit
users:
email: anonymized+%{hash,4}@example.com
expected result
before
expected result
MySQL [mydb]> SELECT id, email FROM users ORDER BY id;
+----+----------------------------+
| id | email |
+----+----------------------------+
| 1 | test1@gmail.com |
| 2 | some1@hotmail.com |
| 3 | test1@gmail.com |
+----+----------------------------+
MySQL [mydb]> SELECT id, email FROM users ORDER BY id;
+----+----------------------------+
| id | email |
+----+----------------------------+
| 1 | anonymized+fdas@example.com | <- same data outputs same data
| 2 | anonymized+32bf@example.com |
| 3 | anonymized+fdas@example.com | <- same data outputs same data
+----+----------------------------+
background
when we want to use anonymized data for performance tuning purpose, we don't want to change data cardinality in records, otherwise, it is not showing the correct sql execution plan.
grammar
pass with digit
expected result
before
expected result
Tech tips