Two Plus Two Publishing LLC Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > Other Topics > Programming

Notices

Programming Discussions about computer programming

Reply
 
Thread Tools Display Modes
Old 10-06-2011, 03:23 PM   #1
Excelling at Flash
 
zomg's Avatar
 
Join Date: Nov 2006
Posts: 1,376
SQL Thread

I'm trying to convert a MsSQL Index to MySQL anyone know if there is "INCLUDE" and "WHERE" equivalents in mysql? I'm a bit of an index novice so any help appreciated

Code:
CREATE NONCLUSTERED INDEX [idx_filteredIndex] ON [dbo].[mainTable] 
(
	[column_1] ASC,
	[column_2] ASC,
	[column_3] ASC
)
INCLUDE ( [column_4],
    [column_5],
    [column_6],
    [column_7],
    [column_8],
    [column_9]) 
WHERE ([column_10]=(0) AND [column_11]=(0))

WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF,
    SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, 
    DROP_EXISTING = OFF, ONLINE = OFF, 
    ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) 

ON [PRIMARY]
GO
zomg is offline   Reply With Quote
Old 10-08-2011, 03:43 PM   #2
grinder
 
shakedown's Avatar
 
Join Date: Aug 2007
Posts: 480
I don't know the answer but im sure google does. The WHERE index is called a filtered or partial index. The INCLUDE index is a covering index.
shakedown is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 12:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.
Copyright © 2008-2010, Two Plus Two Interactive