The following question came up on OTN recently:
Which one gives better performance? Could please explain.
1) nvl( my_column, ‘N’) <> ‘Y’
2) nvl( my_column, ‘N’) = ‘N’
It’s a question that can lead to a good 20 minute discussion – if you were in some sort of development environment and had a fairly free hand to do whatever you wanted.
The most direct answer is that you could expect the performance to be the same whichever option you chose – but the results might be different, of course, unless you had a constraint on my_column that ensured that it would hold only null, ‘Y’, or ‘N’. (Reminder: the constraint check (my_column in (‘Y’,’N’) will allow nulls in the column).