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";



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to