@@ -263,45 +263,36 @@ insert into schema_b.tab5 (uid,sometext1,sometext2) values (2, 'b1', 'b2');
263263insert into schema_b .tab5 (uid,sometext1,sometext2) values (1 , ' a1' , ' a2' );
264264
265265# ######
266- # Big Table with 128 rows
266+ # Big Table with 1,000,000 rows
267267
268268create table schema_A .bigtable(
269269 uid INT ,
270270 rndint INT ,
271271 PRIMARY KEY ( uid )
272272);
273273
274- INSERT INTO schema_A .bigtable ( uid, rndint ) VALUES ( 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ));
275- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
276- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
277- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
278- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
279- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
280- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
281- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
282- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
283- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
284- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
285- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
286- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
287- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
288- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
289- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
290- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
291- INSERT IGNORE INTO schema_A .bigtable ( uid, rndint ) select 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 ) from schema_A .bigtable ;
274+ INSERT IGNORE INTO schema_A .bigtable ( uid, rndint )
275+ SELECT 2 * round(rand() * 1073741823 ), 2 * round(rand() * 1073741823 )
276+ FROM
277+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t1,
278+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t2,
279+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t3,
280+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t4,
281+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t5,
282+ (select 0 as i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9 ) as t6;
292283
293284create table schema_B .bigtable(
294285 uid INT ,
295286 rndint INT ,
296287 PRIMARY KEY ( uid )
297288);
298289
299- INSERT IGNORE INTO schema_B .bigtable ( uid, rndint ) select uid, rndint from schema_A .bigtable ;
290+ INSERT IGNORE INTO schema_B .bigtable ( uid, rndint ) select sql_no_cache uid, rndint from schema_A .bigtable ;
300291
301- INSERT INTO schema_A .bigtable ( uid, rndint ) VALUES ( 500000000 , 1234 );
302- INSERT INTO schema_B .bigtable ( uid, rndint ) VALUES ( 500000000 , 4567 );
303- INSERT INTO schema_A .bigtable ( uid, rndint ) VALUES ( 700000000 , 1234 );
304- INSERT INTO schema_B .bigtable ( uid, rndint ) VALUES ( 300000000 , 4567 );
292+ INSERT INTO schema_A .bigtable ( uid, rndint ) VALUES ( 500000001 , 1234 );
293+ INSERT INTO schema_B .bigtable ( uid, rndint ) VALUES ( 500000001 , 4567 );
294+ INSERT INTO schema_A .bigtable ( uid, rndint ) VALUES ( 700000001 , 1234 );
295+ INSERT INTO schema_B .bigtable ( uid, rndint ) VALUES ( 300000001 , 4567 );
305296
306297# ######
307298# View to make sure it has no impact
0 commit comments