DROP TABLE IF EXISTS test; CREATE TABLE test ( ID_test varchar(10) NOT NULL default '', foo int NOT NULL default '0' ); --disable_query_log INSERT INTO test (ID_test, foo) VALUES ('0000000010', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000Z', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001d', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001b', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001e', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000T', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000P', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000019', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000011', 1); INSERT INTO test (ID_test, foo) VALUES ('000000000X', 1); INSERT INTO test (ID_test, foo) VALUES ('000000000c', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000O', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000a', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000k', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000002', 1); INSERT INTO test (ID_test, foo) VALUES ('000000001m', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000007', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000W', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001c', 1); INSERT INTO test (ID_test, foo) VALUES ('0000000009', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000r', 0); INSERT INTO test (ID_test, foo) VALUES ('000000000s', 1); INSERT INTO test (ID_test, foo) VALUES ('0000000017', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001a', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001i', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001g', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001h', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001r', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001p', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001l', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001n', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001o', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001q', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001t', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001s', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001u', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001v', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001w', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001x', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001y', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001A', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001z', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001B', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001G', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001C', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001D', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001E', 1); INSERT INTO test (ID_test, foo) VALUES ('000000001F', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001U', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001H', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001I', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001J', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001K', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001L', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001M', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001N', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001S', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001T', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002b', 1); INSERT INTO test (ID_test, foo) VALUES ('0000000022', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000021', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001V', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001W', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001X', 0); INSERT INTO test (ID_test, foo) VALUES ('000000001Y', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000025', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000026', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000027', 0); INSERT INTO test (ID_test, foo) VALUES ('0000000028', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002d', 1); INSERT INTO test (ID_test, foo) VALUES ('0000000029', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002a', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002g', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002c', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002k', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002e', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002h', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002j', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002l', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002m', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002q', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002p', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002x', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002r', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002u', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002v', 1); INSERT INTO test (ID_test, foo) VALUES ('000000002w', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002z', 0); INSERT INTO test (ID_test, foo) VALUES ('000000002y', 1); --enable_query_log SELECT * FROM test ORDER BY foo DESC LIMIT 0, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 15, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 30, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 45, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 60, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 75, 15; SELECT * FROM test ORDER BY foo DESC LIMIT 80, 15; #SELECT * FROM test #ORDER BY foo DESC;