⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spacetable.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 2 页
字号:
ij> -- testing Space table-- unfilled pages column of space table is just a guess, thus it is-- not consistent across runs, in particular for indexes, but also for-- tables. -- Therefore tests do not report the numunfilledpages columnrun resource 'createTestProcedures.subsql';ij> CREATE FUNCTION  PADSTRING (DATA VARCHAR(32000), LENGTH INTEGER) RETURNS VARCHAR(32000) EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Formatters.padString' LANGUAGE JAVA PARAMETER STYLE JAVA;0 rows inserted/updated/deletedij> CREATE PROCEDURE WAIT_FOR_POST_COMMIT() DYNAMIC RESULT SETS 0 LANGUAGE JAVA EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.T_Access.waitForPostCommitToFinish' PARAMETER STYLE JAVA;0 rows inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');0 rows inserted/updated/deletedij> create table ideleteu (a varchar(2000), b varchar(2000)) ;0 rows inserted/updated/deletedij> insert into ideleteu values (PADSTRING('rrrrrrrrrr',2000), PADSTRING('ssssssssssssssss',2000));1 row inserted/updated/deletedij> insert into ideleteu values (PADSTRING('rrrrrrrrrr',2000), PADSTRING('ssssssssssssssss',2000));1 row inserted/updated/deletedij> insert into ideleteu values (PADSTRING('rrrrrrrrrr',2000), PADSTRING('ssssssssssssssss',2000));1 row inserted/updated/deletedij> insert into ideleteu values (PADSTRING('rrrrrrrrrr',2000), PADSTRING('ssssssssssssssss',2000));1 row inserted/updated/deletedij> insert into ideleteu values (PADSTRING('rrrrrrrrrr',2000), PADSTRING('ssssssssssssssss',2000));1 row inserted/updated/deletedij> -- This query also tests the SpaceTable class aliasselect conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('IDELETEU') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------IDELETEU                                                                                                                        |0     |6                   |0                   |4096       |0                   ij> delete from ideleteu;5 rows inserted/updated/deletedij> CALL WAIT_FOR_POST_COMMIT();0 rows inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('IDELETEU') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------IDELETEU                                                                                                                        |0     |1                   |5                   |4096       |20480               ij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('PLATYPUS') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ij> create table platypus (a varchar(1000), b varchar(3500), c varchar(400), d varchar(100)) ;0 rows inserted/updated/deletedij> create index kookaburra on platypus (a) ;0 rows inserted/updated/deletedij> create index echidna on platypus (c) ;0 rows inserted/updated/deletedij> create index wallaby on platypus (a,c,d) ;0 rows inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('PLATYPUS') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA                                                                                                                         |1     |1                   |0                   |4096       |0                   KOOKABURRA                                                                                                                      |1     |1                   |0                   |4096       |0                   PLATYPUS                                                                                                                        |0     |1                   |0                   |4096       |0                   WALLABY                                                                                                                         |1     |1                   |0                   |4096       |0                   ij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('PLATYPUS') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA                                                                                                                         |1     |1                   |0                   |4096       |0                   KOOKABURRA                                                                                                                      |1     |4                   |0                   |4096       |0                   PLATYPUS                                                                                                                        |0     |13                  |0                   |4096       |0                   WALLABY                                                                                                                         |1     |8                   |0                   |4096       |0                   ij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> insert into platypus values (PADSTRING('wwwwwww',1000), PADSTRING('xxx',3500), PADSTRING('yy',400), PADSTRING('zzz',100));1 row inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('PLATYPUS') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA                                                                                                                         |1     |3                   |0                   |4096       |0                   KOOKABURRA                                                                                                                      |1     |8                   |0                   |4096       |0                   PLATYPUS                                                                                                                        |0     |21                  |0                   |4096       |0                   WALLABY                                                                                                                         |1     |16                  |0                   |4096       |0                   ij> delete from platypus;10 rows inserted/updated/deletedij> CALL WAIT_FOR_POST_COMMIT();0 rows inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('PLATYPUS') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA                                                                                                                         |1     |1                   |2                   |4096       |8192                KOOKABURRA                                                                                                                      |1     |1                   |7                   |4096       |28672               PLATYPUS                                                                                                                        |0     |1                   |20                  |4096       |81920               WALLABY                                                                                                                         |1     |15                  |1                   |4096       |4096                ij> select conglomeratename, isindex, numallocatedpages, numfreepages, numunfilledpages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('NONEXISTING') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |NUMUNFILLEDPAGES    |PAGESIZE   |ESTIMSPACESAVING    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ij> create table "platypus2" (a varchar(10), b varchar(1500), c varchar(400), d varchar(100)) ;0 rows inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> insert into "platypus2" (values (PADSTRING('wwwwwww',10), PADSTRING('xxx',1500), PADSTRING('yy',400), PADSTRING('zzz',100)));1 row inserted/updated/deletedij> create index kookaburra2 on "platypus2" (a);0 rows inserted/updated/deletedij> create index echidna2 on "platypus2" (c);0 rows inserted/updated/deletedij> create index wallaby2 on "platypus2" (a,c,d) ;0 rows inserted/updated/deletedij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving	from new org.apache.derby.diag.SpaceTable('platypus2') t	order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA2                                                                                                                        |1     |1                   |0                   |4096       |0                   KOOKABURRA2                                                                                                                     |1     |1                   |0                   |4096       |0                   WALLABY2                                                                                                                        |1     |1                   |0                   |4096       |0                   platypus2                                                                                                                       |0     |6                   |0                   |4096       |0                   ij> select conglomeratename, isindex, numallocatedpages, numfreepages, pagesize, estimspacesaving    from SYS.SYSSCHEMAS s,         SYS.SYSTABLES t,         new org.apache.derby.diag.SpaceTable(SCHEMANAME,TABLENAME) v    where s.SCHEMAID = t.SCHEMAID    and s.SCHEMANAME = 'APP'    order by conglomeratename;CONGLOMERATENAME                                                                                                                |ISIND&|NUMALLOCATEDPAGES   |NUMFREEPAGES        |PAGESIZE   |ESTIMSPACESAVING    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ECHIDNA                                                                                                                         |1     |1                   |2                   |4096       |8192                ECHIDNA2                                                                                                                        |1     |1                   |0                   |4096       |0                   IDELETEU                                                                                                                        |0     |1                   |5                   |4096       |20480               KOOKABURRA                                                                                                                      |1     |1                   |7                   |4096       |28672               KOOKABURRA2                                                                                                                     |1     |1                   |0                   |4096       |0                   PLATYPUS                                                                                                                        |0     |1                   |20                  |4096       |81920               WALLABY                                                                                                                         |1     |15                  |1                   |4096       |4096                WALLABY2                                                                                                                        |1     |1                   |0                   |4096       |0                   platypus2                                                                                                                       |0     |6                   |0                   |4096       |0                   ij> drop table platypus;0 rows inserted/updated/deletedij> drop table "platypus2";0 rows inserted/updated/deletedij> autocommit off;ij> drop table foo_int;ERROR 42Y55: 'DROP TABLE' cannot be performed on 'FOO_INT' because it does not exist.ij> create table foo_int (a int);0 rows inserted/updated/deletedij> drop table foo_char;ERROR 42Y55: 'DROP TABLE' cannot be performed on 'FOO_CHAR' because it does not exist.ij> create table foo_char (a char(100)) ;0 rows inserted/updated/deletedij> drop table foo_varchar;ERROR 42Y55: 'DROP TABLE' cannot be performed on 'FOO_VARCHAR' because it does not exist.ij> create table foo_varchar (a varchar(32000)) ;0 rows inserted/updated/deletedij> -- let the foo_longxxx get created at 32Kcall SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', NULL);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -