I really want to know about there would be any performance impact while comparing table column with the same table column like
select id, name from person
where name = coalesce(NULLIF(:application_parameter,''),name)
So in above example if I don't recieve parameter from my application(if it's null or blank) then query will be
select id, name from person
where name = name
This is just a sample, but in my application it's really a complex query. I know there are some alternates to this like create dynamic query(append where condition only if you want it).
But I am only interested to know what will be the performance impact if I compare column with the same column.
1
to a million records, it's really trivial to perform that comparison. What's not trivial is to find that data and retrieve it. Everyone who answered so far seem to be answering about the performance impact of obtaining data.