Subject Re: [firebird-support] Re: Database file disk fragmentation
Author Ann W. Harrison
Alan McDonald wrote:
>
> but Adam, imagine the DB page size equals the HD cluster size.

Or imagine that you've got a system that uses striping ...

Generally, databases are not read front to back so they can be
streamed off disk. Most applications make use of some records
from table A and some from table B for one query and some from
B and some from C in another query. Fragmentation (up to a point)
can actually gain as you are able to read during different stages
of rotation in your random access. That requires a lot more luck
than skill.

> I'm not even sure (I recall Ann Harrison saying something along these lines)
> that GBAK will put all the DB pages back in some kind of natural table order
> (which would be no great advantage either as I understand).

A gbak and restore will put all the data from a table on logically
contiguous pages in the file. Each index will also be logically
contiguous. Sometimes that helps, sometimes it doesn't.

With lots of money and an Oracle DBA, you can tune Oracle to work
with disk placement and get better performance until you need more
disk. Then you start over. Firebird does several tricks to
minimize the effect of placement (e.g. getting all index hits
first, then going at the data in storage order) - the goal is to
get good enough performance without worrying about placement.

Regards,


Ann