Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Optimisation level
Sat, Nov 14 2009 4:29 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Is there a way (fast obviously) to determine the optimisation level of a table? Possible definition (deleted records still in table) / (undeleted records in table)

Roy Lambert
Mon, Nov 16 2009 3:51 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Is there a way (fast obviously) to determine the optimisation level of a
table? Possible definition (deleted records still in table) / (undeleted
records in table) >>

Well, the fastest way would be to compare the row count returned by EDB
(TEDBTable.RecordCount) with the size of the table's rowset file (.edbtbl
file) divided by the row size.  The header size of a table is 16384 bytes,
so the optimization level can be determined as such:

((.edbtbl size - 16384) div row size) - (row count * row size) = free space

The row size of a table can be retrieved via the TEDBTable.RecordSize
property.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 17 2009 2:36 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Unless I'm missing something that wouldn't take account of blobs would it?

Roy Lambert
Tue, Nov 17 2009 6:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Unless I'm missing something that wouldn't take account of blobs would
it? >>

No, but it will still give you an idea of how much free space is in the
table in general, which will usually correlate fairly closely in the BLOB
blocks also, since most BLOBs will be populated/not populated according to
the deletion status of the rows.

I'm working on a database analysis addition to the EDB Manager that will do
things like this.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Nov 18 2009 4:05 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>I'm working on a database analysis addition to the EDB Manager that will do
>things like this.

Neat. Is that before or after you go for some sleep?

Roy Lambert
Fri, Nov 20 2009 2:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Neat. Is that before or after you go for some sleep? >>

I've got so many balls in the air, it's ridiculous. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image