Hello,
I have the following tables in my db
Painter (id integer, uri varchar(256)) and
paints (id1 integer, id2 integer)
I want to optimize the question
select id from Painter where uri = 'xxxxx';
What kind of index (Btree or Hash) is more efficient to create on field
uri since it's a string?
I also want to optimize the join between the ables Painter and paints
on the fields id and id1 respectively?
I can either define the field id as a Primary Key or create an Btree index
on it. What is more effient??
>From my test I see that creating Btree index is a bit faster!!.
Would the performance (of the join) be improved if I created indexes
both on field id and id1 or it's sufficient to create one of the two
indexes ?
As far as I can see the performance is improved if I have a Primary Key on
Painter.id and a BTree index on paints.id1. However when I create a
Btree index on Painter.id and a BTree index on paints.id1 performance
gets worst.
thank you in advance for your help
Sofia Alexaki
[EMAIL PROTECTED]