SAPDB uses cost based optimizer for one tables queries. Each query will be evaluated agains actual content of queried table. In your example table don't contains data. If optimizer uses primary key we need 1 page access. If index is used 2 pages will be read (1 index page, 1 primary data). Therefore optimizer decide for primary key access.
"update statistics" is only necessary for joining tables, because this optimizer supports on this statistic values. Gert "Flemming Frandsen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sven K�hler wrote: > > > it seems, that SAP doesn't use any other index than the primary one, > > but what do i have to do to enable index-use? > > I think you need to "update statistics", so the database finds out that > the you have enough rows in the table to make it an advantage to use the > index. > > Here we run 'dbmcli -u DBM,DBM -d ZDB -c sql_updatestat' daily during > off hours and manually after importing large amounts of data... > > -- > Regards Flemming Frandsen - http://dion.swamp.dk > PartyTicket.Net co founder & Yet Another Perl Hacker _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
