What the best way to work around this? I have the same SELECT statement but there are different criteria depending on the IF check. Well, if you happen to be using Sql Server you can do that sort of ...
I've said it before and I'll say it again: If you want to speed up your application, don't look at your code, look at your data access. The two slowest things you can do in application development are ...
SQL Server's OpenJson function will let you dismantle JSON structures into relational tables, including tables with foreign/primary key relationships. As I noted in an earlier column, JSON is great ...