I don't think so Mark....I believe the reason you are causing the table scan
is because of the OR, not because of the $NULL$.  You may try a compound
index on Status and Assigned Person....this MAY help avoid a table scan, but
you must include the $NULL$ to get those...let me know if a compound index
works for this.

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[email protected]] On Behalf Of Brittain, Mark
Sent: Monday, March 14, 2011 12:49 PM
To: [email protected]
Subject: Re: Question about NULL

$NULL$

'Status' < "Closed" AND ('Assigned Person' != "Mark Brittain" OR 'Assigned
Person' = $NULL$)

-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[email protected]] On Behalf Of Elry
Sent: Monday, March 14, 2011 2:40 PM
To: [email protected]
Subject: Re: Question about NULL

Just a quick question Mark...

Did you mean $NULL$ OR NULL.


On Mar 14, 2:05 pm, "Brittain, Mark" <[email protected]> wrote:
> HI All,
>
> I have a table that uses the following query which searches for any open
record that is not assigned to me.
>
> 'Status' < "Closed" AND ('Assigned Person' != "Mark Brittain" OR 'Assigned
Person' = NULL)
>
> If I use the query without the Assigned Person' = NULL the result does not
include any records that are not assigned.  Both fields are indexed but the
NULL causes the full table scan. Is there a way  to write query so that
indexing is used but I get the records that are unassigned?
>
> Thanks
> Mark
>
> ____________________________________________
> Mark Brittain
> Remedy Developer
> NaviSite
> [email protected]<mailto:[email protected]>
> (315) 453-2912 x5335 (Office)
> (315) 317.2897 (Cell)
>
>   ________________________________
> This e-mail is the property of NaviSite, Inc. It is intended only for the
person or entity to which it is addressed and may contain information that
is privileged, confidential, or otherwise protected from disclosure.
Distribution or copying of this e-mail, or the information contained herein,
to anyone other than the intended recipient is prohibited.
>
>
___________________________________________________________________________­
____
> UNSUBSCRIBE or access ARSlist Archives atwww.arslist.org
> attend wwrug11www.wwrug.comARSList: "Where the Answers Are"

____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

____________________________________________________________________________
___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

Reply via email to