Commit Graph

1643 Commits

Author SHA1 Message Date
Marc G. Fournier d146305065 Patches for Vadim's multikey indexing... 1997-03-18 18:41:37 +00:00
Vadim B. Mikheev 36058981a4 Added: UNIQUE feature to bulkload code. 1997-02-22 10:08:27 +00:00
Bruce Momjian a17b01f320 Update btree patches that were missed. 1997-02-18 17:14:25 +00:00
Bruce Momjian d38767fcb5 Add prototypes and remove unused variables from btree Fastbuild patch. 1997-02-14 22:47:36 +00:00
Marc G. Fournier 5d9f146c64 What looks like some *major* improvements to btree indexing...
Patches from: aoki@CS.Berkeley.EDU (Paul M. Aoki)

i gave jolly my btree bulkload code a long, long time ago but never
gave him a bunch of my bugfixes.  here's a diff against the 6.0
baseline.

for some reason, this code has slowed down somewhat relative to the
insertion-build code on very small tables.  don't know why -- it used
to be within about 10%.  anyway, here are some (highly unscientific!)
timings on a dec 3000/300 for synthetic tables with 10k, 100k and
1000k tuples (basically, 1mb, 10mb and 100mb heaps).  'c' means
clustered (pre-sorted) inputs and 'u' means unclustered (randomly
ordered) inputs.  the 10k table basically fits in the buffer pool, but
the 100k and 1000k tables don't.  as you can see, insertion build is
fine if you've sorted your heaps on your index key or if your heap
fits in core, but is absolutely horrible on unordered data (yes,
that's 7.5 hours to index 100mb of data...) because of the zillions of
random i/os.

if it doesn't work for you for whatever reason, you can always turn it
back off by flipping the FastBuild flag in nbtree.c.  i don't have
time to maintain it.

good luck!

baseline code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   8.6
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   9.1
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.2
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   652.4
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.1
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   26772.9

bulkloading code:

time psql -c 'create index c10 on k10 using btree (c int4_ops)' bttest
real   11.3
time psql -c 'create index u10 on k10 using btree (b int4_ops)' bttest
real   10.4
time psql -c 'create index c100 on k100 using btree (c int4_ops)' bttest
real   59.5
time psql -c 'create index u100 on k100 using btree (b int4_ops)' bttest
real   63.5
time psql -c 'create index c1000 on k1000 using btree (c int4_ops)' bttest
real   636.9
time psql -c 'create index u1000 on k1000 using btree (b int4_ops)' bttest
real   701.0
1997-02-12 05:04:52 +00:00
Vadim B. Mikheev c7990b35f7 index_insert has now HeapRelation as last param (for
unique index implementation).
1997-01-10 09:36:34 +00:00
Vadim B. Mikheev b41aa3903c TransactionIdIsInProgress moved to shmem.c 1996-11-27 07:32:10 +00:00
Marc G. Fournier 07a65b2255 Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>
Changes:

        * Unique index capability works using the syntax 'create unique
          index'.

        * Duplicate OID's in the system tables are removed.  I put
          little scripts called 'duplicate_oids' and 'find_oid' in
          include/catalog that help to find and remove duplicate OID's.
          I also moved 'unused_oids' from backend/catalog to
          include/catalog, since it has to be in the same directory
          as the include files in order to work.

        * The backend tries converting the name of a function or aggregate
          to all lowercase if the original name given doesn't work (mostly
          for compatibility with ODBC).

        * You can 'SELECT NULL' to your heart's content.

        * I put my _bt_updateitem fix in instead, which uses
          _bt_insertonpg so that even if the new key is so big that
          the page has to be split, everything still works.

        * All literal references to system catalog OID's have been
          replaced with references to define'd constants from the catalog
          header files.

        * I added a couple of node copy functions.  I think this was a
          preliminary attempt to get rules to work.
1996-11-13 20:56:15 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Marc G. Fournier e0b772cc00 another gone 1996-11-06 08:52:04 +00:00
Marc G. Fournier 6608278ea4 these ones have their dependencies cleaned up 1996-11-05 10:37:16 +00:00
Marc G. Fournier d1e9a76131 Another run through.
This gets us a clean compile of 'common' and 'gist' with *clean* #include
files
1996-11-05 08:18:44 +00:00
Marc G. Fournier 51716fdd8d Another 1996-11-05 07:24:03 +00:00
Marc G. Fournier 9ec5e78613 And another one 1996-11-05 07:22:50 +00:00
Marc G. Fournier bc711a3f54 Another one bits the dust... 1996-11-05 07:20:09 +00:00
Marc G. Fournier 54c2aa99bd And another... 1996-11-05 07:18:05 +00:00
Marc G. Fournier 8202bce9ba And another.. 1996-11-05 07:15:58 +00:00
Marc G. Fournier 7585d25185 Another one cleaned out 1996-11-05 07:07:22 +00:00
Marc G. Fournier 434201d8d7 another pass through.
Note.  all include files that have been hit so far have had extraneous
       include files cleaned out and are reduced to...the lowest common
       "include file", based on 'cc -Wall -I. test.c', where test.c is:

#include "postgres.h"
#include "<top of branches>" (ie. top of branches this time was utils/fcache2.h)
1996-11-04 08:53:07 +00:00
Marc G. Fournier 5a5f9420e5 Another series started from utils/builtins.h 1996-11-04 07:46:06 +00:00
Marc G. Fournier d93d3c843a -Wall based cleanup of include files, based from acl.h, and everything
that it depends on
1996-11-04 07:18:46 +00:00
Marc G. Fournier ff36ebc922 More cleans of the inter-dependencies in the #include files 1996-11-03 12:13:35 +00:00
Marc G. Fournier 0c960e7fc0 More include file cleanups 1996-11-03 08:17:38 +00:00
Marc G. Fournier 3516eda61c Okay, following Bryan's (and others) suggestions...cleaning up the
include files properly...yet, slowly...
1996-11-01 09:31:17 +00:00
Marc G. Fournier f44acab12c Include dependencies based on tupdesc.h, as:
access/tupdesc.h
	catalog/pg_attribute.h
	nodes/pg_list.h
		nodes/nodes.h
	access/attnum.h
1996-11-01 09:22:37 +00:00
Marc G. Fournier 99412aef23 remove:
#include "postgres.h"
	#include "c.h"
1996-10-31 09:51:30 +00:00
Bruce Momjian 3d7fe6c97c Added needed include file. 1996-10-31 05:58:01 +00:00
Marc G. Fournier f36b2560a4 Major code cleanups from D'arcy (-Wall -Werror) 1996-10-23 07:42:13 +00:00
Marc G. Fournier 8325d9fc3b Define prototypes from giststrat.c required in gistscan.c 1996-10-21 05:05:42 +00:00
Marc G. Fournier 2b5a8bc38b More include files cleaned up 1996-10-20 06:35:27 +00:00
Marc G. Fournier 0eac5b0ed5 Welp, another subdirectory cleaned out of redundant/unused #include
files
1996-10-19 06:27:33 +00:00
Marc G. Fournier 4c9309a8d5 another small one 1996-10-19 04:36:08 +00:00
Marc G. Fournier 7260183685 ...same 1996-10-19 04:09:32 +00:00
Marc G. Fournier d0bfb6b78d slow work... 1996-10-19 04:08:58 +00:00
Marc G. Fournier 6fd191c899 another one cleaned up 1996-10-19 04:05:44 +00:00
Marc G. Fournier f3671cc910 another another one 1996-10-19 04:02:39 +00:00
Marc G. Fournier d9ebe7711f clean out include files of including other includes files except those
absolutely required
1996-10-19 03:58:34 +00:00
Marc G. Fournier 1c5fa955cd Add prototype for heap_getattr() to quiet compiler 1996-10-18 17:58:33 +00:00
Marc G. Fournier 3bf2b361f0 Date: Sun, 22 Sep 1996 13:47:39 -0400 (EDT)
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Postgres95-development <pg95-dev@ki.net>
Subject: [PG95-DEV] 2.0 patch for fastgetattr
1996-09-23 08:36:39 +00:00
Marc G. Fournier 475493130d |Subject: Postgres patch: Assert attribute type match
|
|Here's a patch for Version 2 only.  It just adds an Assert to catch some
|inconsistencies in the catalog classes.
|
|--
|Bryan Henderson                                    Phone 408-227-6803
|San Jose, California
|
1996-09-16 05:33:20 +00:00
Marc G. Fournier 1054097464 More cleanups of the include files
- centralizing to simplify the -I's required to compile
1996-08-28 01:59:28 +00:00
Marc G. Fournier ad5a3141a2 c.h is included in postgres.h already 1996-08-28 01:23:59 +00:00
Marc G. Fournier 5a8820efcd Moved from backend/access to include/access 1996-08-27 21:50:29 +00:00