Analyzed table with unanalyzed index

— select distinct ‘analyze table ‘||i.table_name|| ‘ estimate statistics sample 25 percent;’
SELECT ‘Index ‘||i.index_name||’ not analyzed but table ‘||
i.table_name||’ is.’
FROM user_tables t, user_indexes i
WHERE t.table_name = i.table_name
AND t.num_rows IS NOT NULL
AND i.distinct_keys IS NULL

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: