Robert Kr�ger wrote: > > could anyone give me a rule of thumb whether combined indexes > perform better > with sapdb than indexing single columns only? I have a few > tables that > contain a website's access statistics (pageviews, visits and > some other > site-specific things). to speed up performance in queries I have some > redundant information in the tables such as month and year and day as > integers in addition to the timestamp because most reports > are monthly. at > the moment I have an index on all columns that are relevant > for queries (e.g. > year, month, day, login, country). I was wondering if I could expect > performance gains in queries If I create combined indexes for all > combinations that are used in queries/reports (e.g. an index > on month, year, > login for monthly individual statistics etc.)? I know it > depends on the > queries and amounts of data but just give it a shot and take > an educated > guess from your experience. >
It depends like you already mentioned. If your query always includes the same several columns in the search condition with equal prediactes on it it's recommended to create a multiple index over those columns. But if your queries use different columns with variant predicates on it it might be better to have several single indexes. To analyze the index usage you could create both kind of indexes and run your application. Afterwards you could check the column INDEX_USED within the system table DOMAIN.INDEXES and drop or disable the unused indexes. BTW until now there is no possibility to reset this usage flag. But you could drop and recreate the index to reach this. I hope this helps. Kind regards, Holger SAP Labs Berlin _______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
