Subject Re: [IB-Architect] Why should people have to tell computers ...
Author Jim Starkey
At 06:34 PM 3/28/00 +0200, you wrote:
>From: alex-bauer@...
>Maybe I have another question or idea in
>my mind which aims in the same direction:
>Why do I have to tell the DBMS which fields to index?
>The DBMS can manage this by monitoring the accesses to attributes, maintain
>this information and build an index itself.

To a degree, they already do. Most (if not all) databases make an
index for primary keys, many (sometimes misguidedly) create indexes
for foreign keys.

But here is the nasty problem: loads are systematically different.
If the database optimizes itself for weekly production, it may be
pessimized for week end crunching and a disaster for month end.
Do you really want a database optimized for the weekend to run
like a pig Monday through Friday, then reorganizes itself Friday
night for weekday production, which is pessimized for the weekend?
That's a hard problem.

For now I'm content to let users add and drop indexes providing
that the database doesn't go off line, doesn't interfere with
work in progress, doesn't break any existing programs, and makes
everything go faster (and throws out any internally plans that
wouldn't use the index). For now, I hope that's good enough.

I am very sorry about the sweep stuff, incidentally. My fault.
Next time around, no periodic maintenance.

Jim Starkey