Thanks to Yuhao,

Is the colu= mn M.C1 ignored when I invoke "=C2=A0create index idx on EXAMPLE (M.C0, M.C1)=C2=A0"=C2=A0?= =C2=A0

Which of the following two solutions ma= ke sense?

solution a):
=C2=A0 =C2=A0= =C2=A0create index idx_1 on EXAMPLE (M.C0, M.C1)
=C2=A0 =C2=A0 = =C2=A0create index idx_2 on EXAMPLE (M.C1, M.C0)

<= br>
solution b):
=C2=A0 =C2=A0 create index idx_1 on EX= AMPLE (M.C0)
=C2=A0 =C2=A0 create index idx_2 on EXAMPLE (M.C1)

2015-05-17 22:34 GMT+08:00 Yuhao Bi <= span dir=3D"ltr"><byh0831@gmail.com>:
Hi Xiao Tao,

You can create another secondary= index on the same columns.
=C2=A0 =C2=A0 create index another_in= dex on EXAMPLE(M.C1, M.C0)

After doing that, query= b) should return faster.

2015-05-17 22:2= 5 GMT+08:00 Tao Xiao :
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
I tried to build secondary i= ndex for two columns, M.C0 and M.C1: =C2=A0

=C2=A0 =C2=A0 =C2=A0 create index my_idx on EXAMPLE (M.C0, M.C1)

Then I tried to query by two indexes, respe= ctively:

=C2=A0 =C2=A0 a). select M.C0 from EXAMPL= E where M.C0 =3D 'c0_00000001'
=C2=A0 =C2=A0 b). select M= .C1 from EXAMPLE where M.C1 =3D 'c1_00000001'

<= div>Query a) returned results in less than 0.3 second, and query b) returne= d results in about 13 seconds. It seems that index was built for column = M.C0, not M.C1.=C2=A0

Can we build seco= ndary index for two or more columns ?=C2=A0

Thanks= .

--089e01184874a60953051650f48e--