X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamc%2Fisamd.c;h=13754fb0a73a49ba601e8c537501e2189490fb07;hb=cc9f94a61cbd9dcc0df0cf7d0c7c41d2cec88189;hp=191a51cd37b8deb3e7b905304d78f242f886b4c1;hpb=72ca1631366b5196106ac777e492b6a70c273651;p=idzebra-moved-to-github.git diff --git a/isamc/isamd.c b/isamc/isamd.c index 191a51c..13754fb 100644 --- a/isamc/isamd.c +++ b/isamc/isamd.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1995-1998, Index Data. * See the file LICENSE for details. - * $Id: isamd.c,v 1.16 1999-10-05 09:57:40 heikki Exp $ + * $Id: isamd.c,v 1.20 2002-06-19 10:29:18 adam Exp $ * * Isamd - isam with diffs * Programmed by: Heikki Levanto @@ -17,7 +17,7 @@ #include #include -#include +#include #include "../index/index.h" /* isamd uses the internal structure of it_key */ #include "isamd-p.h" @@ -38,12 +38,13 @@ ISAMD_M isamd_getmethod (ISAMD_M me) { 64, 0 }, #else { 32, 1 }, - { 64, 1 }, { 128, 1 }, - { 512, 1 }, + { 256, 1 }, + { 512, 1 }, + { 1024, 1 }, { 2048, 1 }, - { 8192, 1 }, - { 32768, 0 }, + { 4096, 1 }, + { 8192, 0 }, #endif #ifdef SKIPTHIS @@ -179,6 +180,8 @@ ISAMD isamd_open (BFiles bfs, const char *name, int writeflag, ISAMD_M method) int isamd_block_used (ISAMD is, int type) { + if ( type==-1) /* singleton */ + return 0; if (type < 0 || type >= is->no_files) return -1; return is->files[type].head.lastblock-1; @@ -187,6 +190,8 @@ int isamd_block_used (ISAMD is, int type) int isamd_block_size (ISAMD is, int type) { ISAMD_filecat filecat = is->method->filecat; + if ( type==-1) /* singleton */ + return 0; /* no bytes used */ if (type < 0 || type >= is->no_files) return -1; return filecat[type].bsize; @@ -246,14 +251,14 @@ int isamd_close (ISAMD is) is->files[i].no_op_main, is->files[i].no_op_diffonly); } - logf(LOG_LOG,"single %8d", is->no_op_single); - logf(LOG_LOG,"new %8d", is->no_op_new); + logf(LOG_LOG,"open single %8d", is->no_op_single); + logf(LOG_LOG,"open new %8d", is->no_op_new); logf(LOG_LOG, "new build %8d", is->no_fbuilds); logf(LOG_LOG, "append %8d", is->no_appds); logf(LOG_LOG, " merges %8d", is->no_merges); logf(LOG_LOG, " singles %8d", is->no_singles); - logf(LOG_LOG, " non %8d", is->no_non); + logf(LOG_LOG, " no-ops %8d", is->no_non); logf(LOG_LOG, "read blocks %8d", is->no_read); logf(LOG_LOG, "read keys: %8d %8.1f k/bl", @@ -845,7 +850,20 @@ void isamd_pp_dump (ISAMD is, ISAMD_P ipos) /* * $Log: isamd.c,v $ - * Revision 1.16 1999-10-05 09:57:40 heikki + * Revision 1.20 2002-06-19 10:29:18 adam + * align block sizes for isam sys. Better plot for test + * + * Revision 1.19 1999/11/30 13:48:04 adam + * Improved installation. Updated for inclusion of YAZ header files. + * + * Revision 1.18 1999/10/06 15:18:13 heikki + * + * Improving block sizes again + * + * Revision 1.17 1999/10/06 11:46:36 heikki + * mproved statistics on isam-d + * + * Revision 1.16 1999/10/05 09:57:40 heikki * Tuning the isam-d (and fixed a small "detail") * * Revision 1.15 1999/09/27 14:36:36 heikki @@ -886,4 +904,4 @@ void isamd_pp_dump (ISAMD is, ISAMD_P ipos) * Copied from isamh, starting to change things... * * - */ \ No newline at end of file + */