Two Plus Two Poker Forums

Two Plus Two Poker Forums (https://forumserver.twoplustwo.com/)
-   Computer and Technical Help (https://forumserver.twoplustwo.com/48/computer-technical-help/)
-   -   SQL Thread (https://forumserver.twoplustwo.com/48/computer-technical-help/sql-thread-1109298/)

zomg 10-06-2011 03:23 PM

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


shakedown 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.


All times are GMT -4. The time now is 02:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.

Copyright ? 2008-2020, Two Plus Two Interactive