[EMAIL PROTECTED] wrote:

> Hello,
> 
> I'v got a database containing data of multiple companies. The 
> data of one
> company is completely independent of the data of other 
> companies, but the
> rows belonging to different companies are mixed together, 
> this rises the
> level of IO necessary, and seriously wastes cache.
> 
> Is it somehow possible to cluster the related rows into the 
> same pages?
> 
> Thanks,
> Wojtek

If one uses a user-defined primary key for his table, the rows
are sorted according to that primary key and stored in this
sorted form.

--> if the first column of your user-defined primary key would
specify the company, all rows of one company are next to each other,
with no other company-row somewhere in between.

--> searching for all data of one company would only read those
pages full of rows of that company.

But, please allow the question: 
it is necessary to put all the data of all the companies in one table together?
If each company would use its own set of tables ( may be the same name,
but owned by different users ) could solve your problem, too, without
that primary-key-column.

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

Reply via email to