CREATE TABLE orders (id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, customer_id INT UNSIGNED, is_processed TINYINT UNSIGNED);
INSERT INTO orders () VALUES ();
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;
INSERT INTO orders (id) SELECT null FROM orders;


UPDATE orders SET customer_id = FLOOR(RAND()*10000);
UPDATE orders SET is_processed = IF(FLOOR(RAND()*1.01)=1,0,1);
UPDATE orders SET customer_id = 10000 WHERE FLOOR(RAND()*100) >= 99;
ALTER TABLE orders ADD INDEX (customer_id), ADD INDEX (is_processed);





