I would like to know whether EXISTS performs better or is preferential when
coding SQL  rather than using IS NOT NULL. I would also like to know   what
your particular preference is and why.

 

I have used the IS NOT NULL parameter for years. Recently I have tried using
EXISTS which in certain instances seems to  increase code performance.

 

According to Rbase Extreme 9.5 documentation, the EXISTS parameter is only
mentioned(as far as I've seen) when used in a sub-select. Can EXISTS be used
outside a sub-select or not.

 

For Example I could write this;

 

insert into tablename1(column1, column2) sel colname3,colname4 from table2
whe colname5 IS NOT NULL

 

Alternatively I could write;

 

insert into tablename1(column1, column2) sel colname3,colname4 from table2
whe colname5 EXISTS

 

Both work, although I get the feeling that EXISTS works faster.

 

Any input would be appreciated.

 

Bill Eyring

 

 

Reply via email to