You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, if the field SOMEFIELD declared as NOT NULL, when using conditions WHERE SOMEFIELD IS NULL / NOT NULL, will be scanned the entire table (NATURAL) or used index scan. But, obviously, that:
1. Provided WHERE SOMEFIELD IS NULL, will selected 0 records.
2. Provided WHERE SOMEFIELD IS NOT NULL, will selected all records.
Need using this info at creating the execution plan and at executing query.
The text was updated successfully, but these errors were encountered:
Currently SELECT WHERE field IS NULL is the only way to discover corrupted records, which contain NULLs in not nullable field. If optimizer use the rule, there will be no way to fix such broken databases.
Adriano, in fact it depends on implementation :-) The requester wants to avoid an index scan for IS NULL, i.e. make this operation a complete no-op. So adding || '' shouldn't make any difference, as it's not about using an index or not.
Submitted by: Maxim Kuzmin (cybermax)
Votes: 1
Now, if the field SOMEFIELD declared as NOT NULL, when using conditions WHERE SOMEFIELD IS NULL / NOT NULL, will be scanned the entire table (NATURAL) or used index scan. But, obviously, that:
1. Provided WHERE SOMEFIELD IS NULL, will selected 0 records.
2. Provided WHERE SOMEFIELD IS NOT NULL, will selected all records.
Need using this info at creating the execution plan and at executing query.
The text was updated successfully, but these errors were encountered: