Becker, Holger wrote:
J. Jeff Roberts wrote:

I have a question about indices.  If I typically do this:
  select field1, field2 from table where field3 = 1
but I sometimes do this:
  select field1 from table where field3 = 1

You have to valuate the additional space for the index and the overhead to keep index actual. I think one index is the better solution.
But be aware that field3 is the first index column.

I have a similar question. I have some queries with are something like: select a.* from table a where a.f1 = x select a.* from table a where a.f1 = x and a.f2 = y select a.* from table a where a.f2 = y and a.f3 = z select a.* from table a where a.f1 = x and a.f2 = y and a.f3 = z ... These queries are automatically generated by the (java) application.

Should I create three individual indexes or one index with many columns? Which is better for performance? Does the number of different values per column make a difference?

Thanks,
Arne

--
Institute of Shipping Economics and Logistics    http://www.isl.org/
Arne Gehlhaar                                mailto:[EMAIL PROTECTED]
Universitaetsallee GW1 Block A                phone:+49.421.22096.49
D-28359 Bremen, Germany                         fax:+49.421.22096.55

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to