What kind of index should I use ?

Started by Gabriel Fernandezalmost 25 years ago2 messagesgeneral
Jump to latest
#1Gabriel Fernandez
gabi@unica.edu

Hi,

I have a table with a lot of fields and I would want to obtain a quicker
query response.

The main characteristics are:

The table is NOT often updated, I mean INSERT and UPDATE are sporadic
sentences, but SELECT sentences are often executed.

The most used query is something like

select distinct field1 from my_table where field1 is not null and field2
like '...'

Should I use a BTREE index or would be better to use a HASH or RTREE ?

Thanks,

Gabi :-)

#2Einar Karttunen
ekarttun@cs.Helsinki.FI
In reply to: Gabriel Fernandez (#1)
Re: What kind of index should I use ?

On Fri, 18 May 2001, Gabriel Fernandez wrote:

Hi,

I have a table with a lot of fields and I would want to obtain a quicker
query response.

The main characteristics are:

The table is NOT often updated, I mean INSERT and UPDATE are sporadic
sentences, but SELECT sentences are often executed.

The most used query is something like

select distinct field1 from my_table where field1 is not null and field2
like '...'

Should I use a BTREE index or would be better to use a HASH or RTREE ?

Thanks,

Gabi :-)

Use always a btree. The other algorithms are not implemented as well as
btree.

- Einar