phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tao Xiao <xiaotao.cs....@gmail.com>
Subject Can we create an secondary index for two or more columns?
Date Sun, 17 May 2015 14:25:27 GMT
I tried to build secondary index for two columns, *M.C0* and *M.C1*:

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


Then I tried to query by two indexes, respectively:

    a). select M.C0 from EXAMPLE where M.C0 = 'c0_00000001'
    b). select M.C1 from EXAMPLE where M.C1 = 'c1_00000001'

Query a) returned results in less than 0.3 second, and query b) returned
results in about 13 seconds. It seems that index was built for column *M.C0*,
not *M.C1*.

Can we build secondary index for two or more columns ?

Thanks.

Mime
View raw message