Skip to Content
author's profile photo Former Member
Former Member

Is it possible to create own index on table?

Hi,

is it allowed from SAP to create own index on system or user table? Is allowed to make dbcc dbreindex on table?

thanks

Petr

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 05:40 PM

    I don't even neeed to look to know that the offical SAP answer is No.

    Have you checked the avg_fragmentation_in_percent, avg_page_space_used_in_percent from sys.dm_db_index_physical_stats?

    These stats tell you if your index needs reorganizing or defragging.

    1) avg_fragmentation_in_percent > 15 is a candidate for a rebuild

    2) avg_page_space_used_in_percent < 60 is a candidate for a rebuild

    I would create a SQL maintenance plan with a rebuild all indexes job before I thought about adding a new index.

    eg.

    select index_id, avg_fragmentation_in_percent, avg_page_space_used_in_percent from sys.dm_db_index_physical_stats

    (db_id('Your_database'), object_id('table'), null, null, 'detailed') where index_id <> 0

    to rebuild a single index

    alter index all on <tablename>

    rebuild with (fillfactor = 90)

    unless you have enterprise version of sql you will want to do this after hours.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi John,

      thanks for reply. I expected, that the answer is NO 😊

      What I need to do is, that I add my user field to table and this field will be the joining field in query and because the field is varchar and table has a lot of records, the joining takes too long.

      Petr

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 01:27 PM

    can you create your own table with the integer value as the key and the varchar field as an indexed field, then store the integer and the varchar in the b1 table?

    that way you could join on the integer field.

    you could also store either the cardcode or the itemcode in your new table.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.