Open Side Menu Go to the Top

10-06-2011 , 03:23 PM
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
SQL Thread Quote
SQL Thread
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
SQL Thread
10-08-2011 , 03:43 PM
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.
SQL Thread Quote
SQL Thread
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
SQL Thread

      
m