Sys.Indexes items are missing from sys.objects view

  • Hi,

    I have just installed SQL Server 2014

    Product: Microsoft SQL Server Express (64-bit)

    Operating System: Microsoft Windows NT 6.1 (7601)

    Platform: NT x64

    Version: 12.0.2000.8

    Server Collation: Latin1_General_CI_AS

    Is Clustered: False

    Is HADR Enabled: False

    I created a database using right click on Databases --> New Database. I set a name, I left the default options and I pressed OK.

    Executing the following query, I realized that there are items from sys.indexes view that cannot be found in sys.objects.

    Select * From sys.indexes ind

    Where not exists ( select * from sys.objects obj where ind.object_id = obj.object_id )

    The above query retuns the following results:

    5575058 plan_persist_plan_cidx

    5575058 plan_persist_plan_idx1

    21575115 plan_persist_runtime_stats_cidx

    21575115 plan_persist_runtime_stats_idx1

    37575172 plan_persist_runtime_stats_interval_cidx

    37575172 plan_persist_runtime_stats_interval_idx1

    53575229 plan_persist_context_settings_cidx

    2121058592 plan_persist_query_text_cidx

    2121058592 plan_persist_query_text_idx1

    2137058649 plan_persist_query_cidx

    2137058649 plan_persist_query_idx1

    I read that non schema-scoped items are not returned from sys.objects view, but i cannot find any information related to the above items. Until today i used SQL Server 2012 and i didn't have any problem with the above table connection logic.

    What kind of items are these?

    How can i distinguish these items from other (other=the items returned from sys.objects)?

    Thank you in advance.

    Regards,

    Kostas

  • Internal Tables

    http://technet.microsoft.com/en-us/library/ms366343(v=sql.105).aspx

    SELECT

    it.name,

    ind.name

    FROM

    sys.indexes ind

    INNER JOIN

    sys.internal_tables it

    ON ind.object_id = it.object_id

    SELECT

    o.name,

    ind.name

    FROM

    sys.indexes ind

    INNER JOIN

    sys.all_objects o

    ON ind.object_id = o.object_id

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • I think this is the answer to my question.

    Thanks for your reply. 🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply