Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Hypothetical index...or statistics?

Author  Topic 

HenningF
Starting Member

2 Posts

Posted - 2009-05-29 : 04:14:42
Hi,

I've come across a peculiar case in the database I'm administrating. Have a look at this:
EXEC sp_help 'base_customers'

--> Results:

index_name index_description index_keys
_dta_index_BASE_CUSTOMERS_7_1615500984__K1_5 nonclustered, hypothetical located on PRIMARY Customer_No
_dta_index_BASE_CUSTOMERS_7_1615500984__K1_K5 nonclustered, hypothetical located on PRIMARY Customer_No, Customer_type_id
_dta_index_BASE_CUSTOMERS_7_1615500984__K5 nonclustered, hypothetical located on PRIMARY Customer_type_id
_dta_index_BASE_CUSTOMERS_7_1615500984__K5_K1 nonclustered, hypothetical located on PRIMARY Customer_type_id, Customer_No
_dta_index_BASE_CUSTOMERS_c_7_1615500984__K1_K5 nonclustered, hypothetical located on PRIMARY Customer_No, Customer_type_id
IX_CUSTOMERS_NAME nonclustered located on Common Customer_Name
PK_BASE_CUSTOMERS nonclustered, unique, primary key located on Common Customer_No
Now I've read that hypothetical indexes are created by the Index Tuning Wizard but SQL Server Management Studio lists them under Statistics for this given table and not under Indexes which I would expect. So I'm a little confused...are they indexes or statistics? I have tried to run "drop index [BASE_CUSTOMERS].[_dta_index_BASE_CUSTOMERS_7_1615500984__K1_5]" but it takes forever and causes deadlocks to happen in the database...shouldn't dropping a nonclustered index happen instantly?


--
Henning

HenningF
Starting Member

2 Posts

Posted - 2009-05-29 : 05:11:03
Hm, I just found this blog post that basically says that clustered hypothetical indexes must be dropped with the DROP INDEX statement while nonclustered hypothetical indexes must be dropped with the DROP STATISTICS statement. Messed up!!!

-> http://blogs.technet.com/anurag_sharma/archive/2008/04/15/hypothetical-indexes.aspx


--
Henning
Go to Top of Page
   

- Advertisement -