Subject Re: [IBO] Is there a way to change the pagesize of the database ?
Author Helen Borrie (TeamIBO)
At 09:55 PM 03-02-02 +0200, you wrote:
>I mean to ask :
>Is there a way to change the pagesize of the database you want to create
>using the already build (free) ib_sql.exe?

Page_size is not an attribute you can change on an existing version of the database: it is determined when the database is built. If you don't specify a page_size in your CREATE DATABASE statement, it will be the default 1024, which is far too small.

You CAN change the page_size by restoring a .gbk file using GBAK. Just include the -page_size switch and specify the size you want in bytes, in multiples of 1024, up to a maximum of 16384 (for Firebird) or 8192 (for InterBase).

I guess an enhancement could be added to IB_SQL to somehow set up a CREATE DATABASE statement for the user on the basis of user inputs...it doesn't do this now, I guess, because most people write their own scripts or interactive DDL statements.

>The reason i ask is pretty silly: i changed the ibf_sql to allow to change
>the page_size at runtime and was wondering
>if maybe it is already posible and i don't know how?

Don't get confused between the database page size and the database cache size. You *can* change this at connect time, if the user connecting is the first user. This is specified as a number of database pages - so if you specify 250 and your database has a page_size of 8 Kb, then you are asking for a database cache of 2Mb. The database cache needs to "fit" into the RAM available on the server to avoid paging back and forth to disk, so "bigger is better" does not necessarily apply with respect to db cache.


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at www.ibobjects.com