If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Query performance
Can Anybody tell me what performs better in a where clause looking for
several text strings: Method 1: Like "Example_A" or like "Example_B" Method 2: In ("Example_A","Example_B") |
#2
|
|||
|
|||
TomHinkle wrote:
Can Anybody tell me what performs better in a where clause looking for several text strings: Method 1: Like "Example_A" or like "Example_B" Method 2: In ("Example_A","Example_B") -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Those examples mean different things. If Method 1 was like this column_name = "Example_A" or column_name = "Example_B" then it would be the same as method 2. Since you don't have any wildcard characters in your example you should be using the equal sign instead of the Like comparison operator. When using the equal sign in method 1 they both perform the same. The JET optimizer translates method 2 into method 1 when the query runs. -- MGFoster:::mgf00 at earthlink decimal-point net Oakland, CA (USA) -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBQycYbIechKqOuFEgEQJtcQCgwqtgURROBQb3o3WOGKMC0l I1b/MAoIj8 yjgTEmTewUbaRM265T4DqvYI =dMQz -----END PGP SIGNATURE----- |
#3
|
|||
|
|||
Please do not multipost the same question in these newsgroup.
Please see The Access Web http://www.mvps.org/access/netiquette.htm -- HTH Van T. Dinh MVP (Access) "TomHinkle" wrote in message ... Can Anybody tell me what performs better in a where clause looking for several text strings: Method 1: Like "Example_A" or like "Example_B" Method 2: In ("Example_A","Example_B") |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error when running Query, but not Report | Blaze | Running & Setting Up Queries | 29 | September 9th, 2005 05:40 AM |
Moving from xBase/Clipper | [email protected] | New Users | 1 | February 3rd, 2005 08:25 PM |
adding 2 fields including null entries | Jesse | Running & Setting Up Queries | 26 | January 18th, 2005 06:31 PM |
Query performance | Hermione | Running & Setting Up Queries | 0 | January 12th, 2005 05:01 PM |
Compare performance between Sub Query and SQL subquery | Malee | Running & Setting Up Queries | 1 | October 12th, 2004 11:31 AM |