Hi. Yesterday, when connecting with one of our older sa clients, I noticed the log messages listed below. What usually causes these messages to be displayed? One developer speculated that indexing a foreign key might be the cause. No one here knows for sure. Thanks, Doug. Pack 2, v.2825;PID=0xee8;THREAD=0x504;EXE=C:Program FilesSybaseSharedSybase Central 4.3win32scjview.exe;VERSION=9.0.2.2451;API=DBLIB;TIMEZONEADJUSTMENT=- I. 04/03 15:10:46. Performance warning: Redundant index "xpkrpt_parmas_schedule" for table "rpt_params_schedule" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "ssapproval_indx1" for table "sched_self_sched_approval" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "rw_reports_pk_idx" for table "rw_reports" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "rw_columns_pk_idx" for table "rw_columns" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "rw_columns_fk_idx1" for table "rw_columns" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "tables_pk_idx" for table "tables" in database "workprod" I. 04/03 15:15:21. Performance warning: Redundant index "table_columns_pk_idx" for table "table_columns" in database "workprod" I. 04/03 15:16:09. Performance warning: Redundant index "XPKPRACTICE_GRP" for table "practice_grp" in database "workprod" I. 04/03 15:16:09. Performance warning: Redundant index "rw_where_clause_ndx" for table "rw_where_clause" in database "workprod" I. 04/03 15:10:46. Performance warning: Redundant index "xif272rpt_params_scchedule" for table "rpt_params_schedule" in database "workprod" |
Indexes are automatically added to any primary key or foreign key. Therefore, there is no need to explicitly define one. If you do, however, you get this message. From the docs:
|
FWIW, the problem has disappeared with v10. Since then, redundant indizes are still possible but will share the same physical representation and do not cause performance implications. To cite from the v10 What's new doc...
|
There is nothing to speculate about. Some versions ago, indexes on FKs were of help in certain circumstances. In V9, they are absolutely useless, hence the message. |