Solved

WHERE IsNull([Field]) or WHERE [Field] Is Null?

Posted on 2004-09-01
4
402 Views
Last Modified: 2006-11-17
OK folks,

bit of a techie question here. The question (and hence answer) will be of no practical value but I'm curious as to your thoughts. Incidentally, it was triggered by the question 'SQL Query Numeric Field Null Value' below...

Take a very simple query...

SELECT * FROM [Table] WHERE [Field] Is Null

Is this the quickest way of running it, or would WHERE IsNull([Field]) be quicker?

My personal thinking is that SQL runs within Access as a set of compiled functions, with the Is (as in Is Null) operator being a standard part. The function IsNull() must presumably be called from within whatever set of functions Access uses to process SQL, thereby making it (fractionally) slower. However, I am far from convinced that this is correct. To bump this up to the full 500 points, can anybody give me a detailed explanation of how Access processes SQL? i.e. are SELECT, INSERT and so on effectively pointers to built in functions; is there a whole layer of interpretation / optimisation to get through first or is there some other process entirely going on?

Just curious...

Cheers,

s46.
0
Comment
Question by:solution46
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 11956182
Since "Is Null" is a native Jet operator whereas IsNull() is a VBA function, Is Null will always be faster as you don't have the overhead of passing the value through to the VBA engine.

SQL queries are processed by the Jet engine, not Access, which is essentially a shell. There are a bunch of optimisations that Access makes to the query path, and MS's patented (i.e. bought) Rushmore technology. Let me see if I can dig out an on-line reference for you. The Jet Programmer Guide would give you more information though.
0
 
LVL 9

Author Comment

by:solution46
ID: 11956232
Ahhh.. bloody obvious about IsNull() really.

By Access, I really meant Jet, as in the part that does the work! Where can I get hold of the Jet Programmer's Guide? Is that a M$ publication or third party?

s46.

0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 500 total points
ID: 11956296
It's a Micro$oft publication:
http://www.amazon.co.uk/exec/obidos/ASIN/1572313420/qid=1094063257/ref=sr_8_xs_ap_i1_xgl/026-7399276-4787624

That should be for Jet 3.5 - not sure if there is an updated version for Jet 4.
0
 
LVL 9

Author Comment

by:solution46
ID: 11956367
Many thanks - I'll see if I can find a copy lying round a bookshop.

The (hopefully 500) points are now yours.

s46.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question