db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Parker <...@tractionsoftware.com>
Subject Re: pagesize for a given table
Date Tue, 02 Feb 2010 13:25:42 GMT
Following up on my pagesize question....

At what point does derby decide on the pagesize when it is creating a table? I have a table
with several varchar(4000) fields in it. Though they are varchar, does derby calculate row
size based on the maximum possible column size for variable sized columns in deciding whether
to bump up the pagesize to 32K?

I am trying to track down an insert performance problem, and I'm wondering if the extra large
pagesize is causing a problem. The maximum row size for this table is around 5K, but in practice
I'm pretty sure it is a small fraction of that.



On Feb 1, 2010, at 5:26 PM, Knut Anders Hatlen wrote:

> David Parker <dap@tractionsoftware.com> writes:
>> I am trying to address some insert performance issues we are having
>> for a wide table by increasing the pagesize for that table. As far as
>> I can tell, this means issuing a call to syscs_set_database_property
>> to set the desired pagesize, then creating the table. I'd kind of like
>> to be able to verify that the table created has the proper pagesize.
>> Is there a way to determine the pagesize being used by a given table?
> You can use the SYSCS_DIAG.SPACE_TABLE table function:
> http://db.apache.org/derby/docs/10.5/ref/rrefsyscsdiagtables.html
> For example, if you want to verify the page size of the table MYTABLE in
> schema MYSCHEMA, execute the following statement:
> ij> select pagesize from table (syscs_diag.space_table('MYSCHEMA', 'MYTABLE')) s;
> -----------
> 4096       
> 1 row selected
> Hope this helps,
> -- 
> Knut Anders

David Parker

View raw message