Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2007, 04:14 AM
Authorized User
 
Join Date: Apr 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Working of OR operation?

Let the database be:

Create table if not exists maintable (rowid INTEGER PRIMARY KEY, puid INTEGER)
Create Unique Index if not exists puididx on maintable (puid)

Assume a query
"select rowid from maintable where puid = X OR puid = Y or puid = Z"

How will this query work internally?

1 Will it first check the index table for puid = X and get the rowid, then followed by checking the index table for puid = Y, then puid =Z.

2 Will it first check each row puid and match it with X then Y then Z and then move to the second row in maintable? (Without referring to the index table)

3 Will it first check for puid = X in the maintable then check for puid = Y in the maintable and then for puid =z.

4 Any other way





Regards,
Phani
__________________
Regards,
Phani





Similar Threads
Thread Thread Starter Forum Replies Last Post
operation not yet implemented RichardMaly Crystal Reports 11 January 8th, 2013 02:22 PM
New operation types scott.nortman BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 1 June 30th, 2008 05:14 AM
OPeration must be updated khzahid Classic ASP Basics 1 April 27th, 2005 06:01 PM
No log operation acko SQL Server 2000 0 April 2nd, 2004 04:10 AM
Bit Operation in C#? oatcpe C# 1 August 15th, 2003 03:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.