You guys were correct of course. I've added a vacuum (which didn't work
because of that ecpg bug) and now it looks better but still much slower than
Oracle:

I needed 9 seconds and 748620 microseconds for the insert test.
I needed 5 seconds and 882221 microseconds for the selection&projection test.
I needed 10 seconds and 614912 microseconds for the join test.
I needed 0 seconds and 586992 microseconds for the update test.

Anyway, here's the patch on top of may last one to get vacuum going:

*** ./preproc/ecpg.c.orig	Fri Feb 27 16:57:18 1998
--- ./preproc/ecpg.c	Fri Feb 27 16:58:09 1998
***************
*** 58,65 ****
  		/* after the options there must not be anything but filenames */
  		for (fnr = optind; fnr < argc; fnr++)
  		{
! 			char	   *filename,
! 					   *ptr2ext;
  			int			ext = 0;
  
  			filename = mm_alloc(strlen(argv[fnr]) + 4);
--- 58,64 ----
  		/* after the options there must not be anything but filenames */
  		for (fnr = optind; fnr < argc; fnr++)
  		{
! 			char	   *filename, *ptr2ext;
  			int			ext = 0;
  
  			filename = mm_alloc(strlen(argv[fnr]) + 4);
***************
*** 70,77 ****
--- 69,79 ----
  			/* no extension or extension not equal .pgc */
  			if (ptr2ext == NULL || strcmp(ptr2ext, ".pgc") != 0)
  			{
+ #if 0
+ /* dumps core under some circumstances */
  				if (ptr2ext == NULL)
  					ext = 1;	/* we need this information a while later */
+ #endif
  				ptr2ext = filename + strlen(filename);
  				ptr2ext[0] = '.';
  			}
*** ./preproc/preproc.y.orig	Fri Feb 27 16:56:00 1998
--- ./preproc/preproc.y	Fri Feb 27 16:56:12 1998
***************
*** 607,613 ****
  /* FIXME: instead of S_SYMBOL we should list all possible commands */
  sqlcommand : S_SYMBOL | SQL_DECLARE;
  
! sqlstatement_words : sqlstatement_word
  		   | sqlstatement_words sqlstatement_word;
  	
  sqlstatement_word : ':' symbol 
--- 607,613 ----
  /* FIXME: instead of S_SYMBOL we should list all possible commands */
  sqlcommand : S_SYMBOL | SQL_DECLARE;
  
! sqlstatement_words : /* empty */
  		   | sqlstatement_words sqlstatement_word;
  	
  sqlstatement_word : ':' symbol 
*** ./test/perftest.pgc.orig	Fri Feb 27 17:00:36 1998
--- ./test/perftest.pgc	Fri Feb 27 17:01:39 1998
***************
*** 16,21 ****
--- 16,22 ----
  		usec+=1000000;
  	}
  	printf("I needed %ld seconds and %ld microseconds for the %s test.\n", sec, usec, text);
+ 	exec sql vacuum;
  }
  
  int
***************
*** 106,113 ****
  	exec sql drop index number1;
  
  	exec sql drop table perftest1;
- 
- 	exec sql commit;
  
  	return (0);
  }
--- 107,112 ----

Michael

-- 
Dr. Michael Meskes, Project-Manager    | topsystem Systemhaus GmbH
meskes@topsystem.de                    | Europark A2, Adenauerstr. 20
meskes@debian.org                      | 52146 Wuerselen
Go SF49ers! Go Rhein Fire!             | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux!                  | Fax: (+49) 2405/4670-10

Fri, 27 Feb 1998 17:06:15 +0100 (CET)
Michael Meskes <meskes@topsystem.de>
performance & vacuum