Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 16 of 16 total
Thread The index page size is below the required of 8240 - Please help resolve
Thu, Aug 26 2021 4:21 PMPermanent Link

Raul

Team Elevate Team Elevate

On 8/25/2021 10:12 PM, Andrew Hill wrote:
> Raul, thanks for your answer HOWEVER this does not explain why edbMgr works with a less value and Delphi code requires a larger one ?

Are you saying building table in code EDBMgr reuslts in slightly smaller
index page requirement ?

EDBMgr is a normal delphi app using the exact same EDB components so i
would expect executing same command to results in same size.

Are you certain everything is 100% same in terms of table schema and
such for the 2 ways you create the table ?

Raul


Thu, Aug 26 2021 4:26 PMPermanent Link

Raul

Team Elevate Team Elevate

On 8/26/2021 4:09 AM, Roy Lambert wrote:
> Whilst I get that "it" doesn't fit in I do not understand what "it" is. Can you explain? Just for interest rather than any need to know.
>

This gets into Tim level question but my simplistic understanding is
that the index pages store index keys and size of those keys varies.

Things like actual field types in the index and field sizes have an
effect. In addition there likely is some addiitonal housekeeping data
EBD needs to keep for thing like bookmark support, maybe record id and
things like line termination and such.

In case of EDB unicode also means that size doubles for anything string
storage.

Raul
Fri, Aug 27 2021 2:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul


That's sort of what I was thinking. You'll need a left and right link, the actual value, and somewhere, a list of ID's referred to. Its a looooong time since I had to bother about the nuts and bolts of indices and I have no idea what structure Tim is using.

When he re-surfaces I'll be interested to see his reply.

Roy Lambert
Fri, Aug 27 2021 8:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Wed, Sep 1 2021 6:38 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Andrew,

<< I was waiting for Tim to explain why it only works with INDEX SIZE 8240 ? (still waiting)  >>

That's the size required by ElevateDB in order to be able to fit at least 4 index keys on a page.

You're defining VARCHAR columns that are:

   (1022 * 2) = 2044 bytes per key

and that doesn't include index page overhead, etc.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Sep 1 2021 6:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Andrew,

<< Raul, thanks for your answer HOWEVER this does not explain why edbMgr works with a less value and Delphi code requires a larger one ? >>

You're doing something different between the two.

The calculation for the index page size is the same for every index - the only thing that changes is the key size, which is based upon the defined column types/sizes of the columns that make up the index.

This is the calculation:

procedure TEDBIndexColumns.CalculateRequiredPageSize;
begin
  FRequiredPageSize:=BlockOffset(EXTERNAL_PAGE_HEADER_SIZE+((FKeySize+SizeOf(Word)+(SizeOf(Integer)*2))*4),IO_ALIGN_SIZE);
end;

The IO_ALIGN_SIZE constant is 4 bytes - this is required for crypto.  The BlockOffset function just makes sure that the returned value is aligned to the IO_ALIGN_SIZE.

Tim Young
Elevate Software
www.elevatesoft.com
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image