Re: Where statement with variables

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 01/31/05


Date: Mon, 31 Jan 2005 10:45:43 +0100

On Mon, 31 Jan 2005 01:21:02 -0800, Phil wrote:

>Just a quick question for anyone, I have a stored procedure that uses a lot
>of variables in a where statement, the only problem with this is it's very
>slow, I am just listing them something like this
>
>WHERE
>AND (tblSurvey.disposal_method = @disposalRoute OR @disposalRoute = 'null')
>AND (tblSurvey.air_conditioning = @airCon OR @airCon = 'null')
>AND (tblSurvey.documentation = @documentation OR @documentation = 'null')
>
>is there a better way of writting this statement to speed it up.

Hi Phil,

A lengthy explanation about different ways to skin this cat can be found
in Erlands article:

http://www.sommarskog.se/dyn-search.html

Best, Hugo

-- 
(Remove _NO_ and _SPAM_ to get my e-mail address)


Relevant Pages

  • DynIP mail blocking considered harmful (was: Re: My email is rejected by some sites)
    ... mail from any arbitrary source is more likely to be spam ... or viruses, than not. ... This isn't a listing based on behavior of the ... a secondary indicator is being used to ...
    (Debian-User)
  • Re: Sell anything you want online FREE LISTINGS!
    ... and *especially* bogus whois ... or MX entries are likely to be poorly run and possible spam sources. ... If a domain bounces email sent to postmaster in violation of RFC2821 ... section 4.5.1 it is eligable for listing in the postmaster section. ...
    (alt.marketing.online.ebay)
  • Re: blocked by dnsbl.sorbs.net
    ... That's the trade off with any spam filtering of course, if you get 1,000,000 ... email messages a year of which 700,000 are spam and 300,000 are legitimate ... I disabled the SORBS in the RBL list. ... start white listing IP addresses. ...
    (microsoft.public.exchange.admin)
  • Re: A badly-worded warning?
    ... listed on eBay or anywhere on the web for quite a long time. ... You grossly misunderestimate how much people hate spam, ... Kris:>> What makes you think they won't see your listing? ... give up searching every day. ...
    (alt.marketing.online.ebay)
  • Re: lots of cheap thread for people with space.
    ... I would have definitely been insterested and would have missed the listing if it hadn't been brought to my attention here. ... name looks nothing like the name of the ebay seller. ... and for a Gutermann thread rack with 676 brand new threads, the winning bid of £170.00 was a bargain and I think jclark was offering an honest pointer to a good value. ... I took and after investigation think Ken's post was not spam but an honest suggestion. ...
    (alt.sewing)