From: | Allan Engelhardt <allane(at)cybaea(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Known problem with HASH index? |
Date: | 2001-07-09 22:26:04 |
Message-ID: | 3B4A2F7C.AB178195@cybaea.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is there a known problem with HASH type index in PostgreSQL 7.1.2 4PGDG on Red Hat Linux 7.1 (2.4.2 kernel)? I can't find a lot of documentation, but this is what I observe:
[playpen]$ dropdb test; createdb test; psql -f create_table.sql test; psql -c "COPY clients FROM '/tmp/input.txt';" test; psql -c 'CREATE INDEX clients_idx ON clients USING HASH (tel);' test; vacuumdb test; vacuumdb --analyze test
DROP DATABASE
CREATE DATABASE
CREATE
COPY
CREATE
NOTICE: Index clients_idx: NUMBER OF INDEX' TUPLES (916864) IS NOT THE SAME AS HEAP' (1000000).
Recreate the index.
VACUUM
NOTICE: Index clients_idx: NUMBER OF INDEX' TUPLES (916864) IS NOT THE SAME AS HEAP' (1000000).
Recreate the index.
VACUUM
[playpen]$ cat create_table.sql
CREATE TABLE clients (
ClientID integer,
firstname varchar(5),
surname varchar(22),
area varchar(3),
neigh varchar(27),
dimos varchar(50),
tel varchar(7)
The input file is a bit big to include, but was created using this brain-damaged perl script (somebody please teach me how to do random letter strings :-))
#!/usr/local/bin/perl -w
my $i;
my $j;
srand(time||$$);
for ($i = 0; $i<1_000_000; $i++) {
print int(rand(1<<31)), "\t";
foreach $j (1..5) { printf "%c", int(rand(57)+65); } print "\t";
foreach $j (1..22) { printf "%c", int(rand(57)+65); } print "\t";
foreach $j (1..3) { printf "%c", int(rand(57)+65); } print "\t";
foreach $j (1..27) { printf "%c", int(rand(57)+65); } print "\t";
foreach $j (1..50) { printf "%c", int(rand(57)+65); } print "\t";
foreach $j (1..7) { printf "%c", int(rand(10)+48); } print "\n";
}
print "\\.\n";
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Erazo | 2001-07-09 23:24:23 | |
Previous Message | Allan Engelhardt | 2001-07-09 22:05:34 | Re: postgres slower than grep? |