Please notice, that execution plan for
select * from person where (lastname=? or ? is null) and (age > ? or ? is null)
might be less optimal than
select * from person where lastname=?
So in some sense it's better to generate different queries based on input
- Log in to post comments