Re: [HACKERS] index theory

2002-10-16 Thread Hannu Krosing
Karel Zak kirjutas K, 16.10.2002 kell 15:19: > > Hi, > > I have SQL query: > > SELECT * FROM ii WHERE i1='a' AND i2='b'; > > There're indexes on i1 and i2. I know best solution is use one > index on both (i1, i2). > > The EXPLAIN command show that optimalizer wants to use one index: >

Re: [HACKERS] index theory

2002-10-16 Thread Karel Zak
On Wed, Oct 16, 2002 at 09:25:37AM -0400, Rod Taylor wrote: > On Wed, 2002-10-16 at 09:19, Karel Zak wrote: > > > > Hi, > > > > I have SQL query: > > > > SELECT * FROM ii WHERE i1='a' AND i2='b'; > > > > There're indexes on i1 and i2. I know best solution is use one > > index on both (i1,

Re: [HACKERS] index theory

2002-10-16 Thread Rod Taylor
On Wed, 2002-10-16 at 09:19, Karel Zak wrote: > > Hi, > > I have SQL query: > > SELECT * FROM ii WHERE i1='a' AND i2='b'; > > There're indexes on i1 and i2. I know best solution is use one > index on both (i1, i2). > > The EXPLAIN command show that optimalizer wants to use one index: >

[HACKERS] index theory

2002-10-16 Thread Karel Zak
Hi, I have SQL query: SELECT * FROM ii WHERE i1='a' AND i2='b'; There're indexes on i1 and i2. I know best solution is use one index on both (i1, i2). The EXPLAIN command show that optimalizer wants to use one index: test=# explain SELECT * FROM ii WHERE i1='a' AND i1='b';