There’s a bug in MySQL which disabled searching by index if two columns are compared which are of a different type. Magento stores increment_id as VARCHAR in sales_flat_order but Magento does not cast to string when doing queries on that table. If you have a lot of orders you will start to notice that aRead more