Page MenuHomePhabricator

Investigate performance impact of nullable export date column
Open, Needs TriagePublic


We're using a nullable date column to mark donations as exported. According to the book "High Performance MySQL", using nullable values in indexed columns makes the indices slower. To investigate, please create an example table with two indexed columns date_exported (A timestamp) and is_exported (a tinyint that can be 0 or 1). Fill the table with 5 million rows, 10000 of them unexported (a typical state of the spenden table in 2019). Then benchmark queries for the unexported data, using one or the other index. Which one is faster on average (use a benchmark tool to run multiple queries)? which one uses less memory? Is the difference signinficant enough?