On 6 Feb 2017, at 10:28am, dandl <da...@andl.org> wrote:

> I'm hoping we've done something really dumb and obvious, but we can't see it. 

> CREATE INDEX [order_header_type_idx] ON [order_header] ([transaction_type], 
> [sale_type_id]);

Nothing really dumb, but this might help.

Create another two indexes with these three fields in this order:

transaction_type,status_code,sale_type_id
status_code,transaction_type,sale_type_id

Once you’ve done that, run the SQL command ANALYZE on that database.

You can delete the index it doesn’t end up using.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to