Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread Frank Mandarino
On Tue, 11 Jan 2000, admin wrote: > > > I'm trying to use an index on a varchar(32) field, but explain keeps > > > retuning a sequential scan. This is my table and index: > > > > I had a similar problem last year when trying to use an index on a > > char(8) field. Two solutions worked for me:

Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread admin
> > I'm trying to use an index on a varchar(32) field, but explain keeps > > retuning a sequential scan. This is my table and index: > > I had a similar problem last year when trying to use an index on a > char(8) field. Two solutions worked for me: 1) use "bpchar_ops", and > 2) leave out the o

Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread Frank Mandarino
On Mon, 10 Jan 2000, admin wrote: > Following a few suggestions, I have entered 2500 records in the > manufacturer table. Unfortunately, searching for name in the manufacturer > table still returned a sequential scan. > > I then tried changing the btree index to a hash talbe and went through the

Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread admin
I have changed the name field to a char(32) NOT NULL, and I still get a sequential scan. I have added the 2500 records and I did "vacuumdb database" from the command-line. Unfortunately, "vacuum analyze" from the psql prompt returns a pqReadData() error, loses the connection to the backend and ret

Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread admin
Yes, I did try vacuum analyze, but my search query still uses a sequential scan. > > I then tried changing the btree index to a hash talbe and went through the > > same procedure of vacumming and restarting a psql session. Yet again, the > > index wasn't being used. > > But did you try vacuum an

Re: [GENERAL] Re: can't seem to use index

2000-01-11 Thread Patrick Welche
> I then tried changing the btree index to a hash talbe and went through the > same procedure of vacumming and restarting a psql session. Yet again, the > index wasn't being used. But did you try vacuum analyze or just vacuum?