Index Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jose Ines Cantu Arrambide (joseine_at_nospam.com)
Date: 04/28/04


Date: Wed, 28 Apr 2004 12:48:02 -0600

Hello,
    I have a 500,000 record table with the primary key being a bigint
identity column (clustered). I have another column (smallint) that it is not
unique and only has 20 possible values, this column is indexed in ascending
order.
    When I do a select statement in the query analyzer filtering by the
smallint column, I notice that in the execution plan the index of this
column is not being used, it does only a clustered scan. Is it because the
smallint column is not unique? Other reason?

Thanks in advance...
Jose.



Relevant Pages

  • Re: Design question
    ... 5.This is SQL and not assembly language, ... 9.You actually have no idea what the minimum age for a sport is? ... (event_nbr SMALLINT NOT NULL, ... PRIMARY KEY ) ...
    (microsoft.public.sqlserver.programming)
  • Re: triggers
    ... Barcode varcharPRIMARY KEY, ... Quantity_in_Stock smallint NOT NULL ... INSERT StockItems VALUES; ... Barcode varcharFOREIGN KEY REFERENCES StockItemsON DELETE ...
    (microsoft.public.dotnet.framework.aspnet)
  • sybase query problems
    ... aend_geb smallint, ... primary key ... primary key (aendnr) ...
    (microsoft.public.sqlserver.setup)
  • Re: math query problem
    ... aend_geb smallint, ... primary key ... primary key (aendnr) ...
    (microsoft.public.sqlserver.setup)
  • Re: 64 bit data types
    ... All that I can guess about the old ShortInt is that it is ... and the SmallInt is larger than ... LongInt is larger or smaller than BigInt, ...
    (borland.public.delphi.non-technical)