News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance by Turskarama on Tuesday February 28, 2023 @10:01PM (#34978248)
When I said testing that includes integration testing, not just unit tests. We do this exact thing with queries that are known to be complex, run them against databases the same size and complexity as real production databases. It's not hard.
Re:“Clean” Code, Horrible Performance by rerdavies on Tuesday February 28, 2023 @10:40PM (#34978496)
Building representative databases is not straightforward.

If you're lucky enough to eat your own dogfood, run unit tests against a copy(!) of your in-house database. A utility to anonymize the data was a fairly significant investment, but absolutely worth it in the long run. Being able to run and monitor benchmark unit tests for selected critical operations on enterprise-scale test data as part of the continuous-build process: fabulous!