Mailing List Archive



Back to the month index Back to the list index

Richard Swift (Richard.Swift@kanatek.ca)
Fri, 3 Jan 1997 10:22:42 -0500


Message-Id: <c=US%a=_%p=sofpak%l=SRV00004-970103152242Z-807@srv00004.kanatek.ca>
From: Richard.Swift@kanatek.ca (Richard Swift)
Subject: [mSQL] Index File Sizes
Date: Fri, 3 Jan 1997 10:22:42 -0500

Has anyone else noticed how big the index files in 2.0 B1 are? I have a
very modest database with about 12 tables and 16-18 indexes. An ascii
dump results in about 120KB of raw data. du tells me that the msql
database is > 13MB !!! Closer examination reveals huge index files.

To demonstrate, here is a test case:

# msqladmin create test

#msql test
create table foobar (
col1 char(20),
col2 int
)\g

create index ind1 on foobar (col1)\g
create index ind2 on foobar (col2)\g
\q

# ls -l msqldb/test reveals:

-rw------- 1 root root 24 Jan 3 10:12 foobar.dat
-rw------- 1 root root 312 Jan 3 10:12 foobar.def
-rw------- 1 root root 288 Jan 3 10:12 foobar.idx
-rw------- 1 root root 28 Jan 3 10:12 foobar.idx-ind1
-rw------- 1 root root 28 Jan 3 10:12 foobar.idx-ind2
-rw------- 1 root root 4 Jan 3 10:12 foobar.ofl

#msql test
insert into foobar values ('line one',201)\g
\q

# ls -l msqldb/test

-rw------- 1 root root 1281 Jan 3 10:14 foobar.dat
-rw------- 1 root root 312 Jan 3 10:12 foobar.def
-rw------- 1 root root 288 Jan 3 10:12 foobar.idx
-rw------- 1 root root 778268 Jan 3 10:14 foobar.idx-ind1
-rw------- 1 root root 409628 Jan 3 10:14 foobar.idx-ind2
-rw------- 1 root root 4 Jan 3 10:12 foobar.ofl

Is this behaviour correct?

  Richard

--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!