I was doing some tests with H2 1.2.127 and notices this strange behaviour.
I create a new empty DB and execute the following SQL commands through the
browser (provided web-console):
---SQL---
create table files (
fileId identity,
pathId bigint not null default 0,
file varchar not null default '',
size bigint not null default 0
);
create index filesFile on files(file);
insert into files select x, x/10, 'file '||x, x*100 from system_range(1, 10000);
delete from files where fileId>1000;
shutdown compact;
---EOF-SQL---
After that I see file size is 288KB.
Then login again through the browser and execute the following update adding
'.wav' at end of each varchar field.
---SQL---
update files set file=file||'.wav';
shutdown compact;
---EOF-SQL---
I expected that the file size will grow a bit, but surprisingly it became
smaller - 82KB.
Any idea why is that? It seems that if I perform the queries without adding an
index to the varchar field this strange behavoiur in DB size does not occur.
Thanks,
Tsvetozar
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.