You are on page 1of 1

Sybase IQ Index Quick Reference

by Miguel Ribeiro – 2006.12.22

Index Estimated Cardinality Not supported Requirements DML Combinations

FP Fast Projection 1 Byte Max 255 identical values Hint IQ Unique (255) on the table creation

2 Byte Max 65536 identical values Hint IQ Unique (3000) on the table creation

Flat (default) 65537 and over identical values Hint IQ Unique (7000) if default is 1 Byte LIKE '%a%', SUM(A+B), JOIN

LF Low Fast Ideal <1500 unique values bit Max 9999 distinct values Range searches HNG
char() Equality (=), Inequality (!=) CMP
varchar()>255 IN or NOT IN DATE
varbinary>255 MIN(), MAX(), COUNT() TIME
COUNT DISTINCT DTTM
GROUP BY
Joins

HG High Group Over 1500 unique values bit varbinary>255 Primary Key HNG
Higher cardinality char()>255 Unique Constraint CMP
varchar()>255 Foreign Key DATE
Join columns TIME
WHERE clause DTTM
BETWEEN
GROUP BY
SELECT DISTINCT
COUNT DISTINCT

HNG High Non Group Bit-wise Higher cardinality Double Cannot be declared unique Ranges, aggregations HG
Float Cannot be a composite index BETWEEN LF
Real Should not be used to support range searches MIN(). MAX(), SUM(), AVG() CMP
Bit on DATE, DATETIME
Char()>255
Varchar()>255
binary
varbinary()

CMP Compare Bit Compare columns in the same table WHERE clause comparing columns of the same HG
float Both columns mandatory during insert or load. table with <, >, = HNG
real Must compare columns with same data type, LF
double precision and scale.
Cannot be unique

WD Word Minimum 3 bytes char() or varchar() WHERE clause


CONTAINS
LIKE (without wildcard %)

DATE Date Cannot be declared as unique. HG


Single column. HNG

DTTM Datetime Cannot be declared as unique. HG


Single column. HNG

TIME Time Cannot be declared as unique. HG


Single column. HNG

Set MINIMIZE_STORAGE='On' to set IQ unique(255) , 1 byte FP on all columns in create table command

You might also like