-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/13/2015 08:06 PM, Jilong Kuang wrote:
> Sure, that is one option. But I'm just wondering if inside the
> xBestIndex() we can get the value field, we can do a much better
> job to give the cardinality info.

Note that the value could be something other than a constant (eg an
expression like price > delivery_charge*0.9)

You are just helping SQLite pick the best index out of all the
possibilities, so as long as they compare sensibly it is fine.
SQLite's analyze command builds statistical information that is useful
(eg how many different values there are, how (un)evenly they are
distributed).  You could do something similar.

Or just follow Eric's suggestion :-)

Roger

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlVUGasACgkQmOOfHg372QSPcACgpmvvhwEEmj9+ccVgI+qTaw0B
y/YAn2WtrppfLn0PvDpa+n1loqFYgzQW
=vskS
-----END PGP SIGNATURE-----

Reply via email to