Mr Stassen

The point I am making is that any query employing EXISTS/NOT EXISTS will try to use an Index on the referenced column
IF you decide to use a subquery at a later point in time the Index on the column would
STILL be employed when EXISTS/NOT EXISTS is used to reference a column which is Indexed-


Martin Gainty






From: Michael Stassen <[EMAIL PROTECTED]>
To: Martin Gainty <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: In Statement Help
Date: Tue, 03 Aug 2004 10:26:29 -0400
MIME-Version: 1.0
Received: from out011.verizon.net ([206.46.170.135]) by mc4-f36.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Tue, 3 Aug 2004 07:27:49 -0700
Received: from verizon.net ([68.163.178.105]) by out011.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <[EMAIL PROTECTED]>; Tue, 3 Aug 2004 09:24:03 -0500
X-Message-Info: JGTYoYF78jHp2KNdhqDFP5F2qZtI/Vyn
Message-ID: <[EMAIL PROTECTED]>
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1
X-Accept-Language: en-us, en
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [68.163.178.105] at Tue, 3 Aug 2004 09:24:03 -0500
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 03 Aug 2004 14:27:49.0208 (UTC) FILETIME=[0D6CDD80:01C47966]



Martin Gainty wrote:

Andrew et al-

Keep in mind that when you use LIKE you will NOT use an index but you will use a full table scan instead.

Agreed.

Also instead of using IN EXISTS uses Indexes on the master table query..if you have master-heavy or parent-heavy query use EXISTS/NOT EXISTS vs IN/NOT IN

http://archives.postgresql.org/pgsql-performance/2002-12/msg00185.php

It's not clear to me how that post is relevant. First, I'm uncertain of its accuracy. (The author clearly does not understand LEFT JOINs.) Second, I'm not sure it applies to mysql. Third, it's about subqueries, but there were no subqueries in this thread.


HTH,
Martin Gainty

Michael


_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to