insert-mysql-NT_4.0 4.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
Testing server 'MySQL 3.23.23 beta' at 2000-09-01  1:43:39

Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.

Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 206 wallclock secs (30.56 usr 39.33 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing insert of duplicates
Time for insert_duplicates (300000): 59 wallclock secs ( 8.80 usr 11.75 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Retrieving data from the table
Time for select_big (10:3000000): 87 wallclock secs (61.98 usr 25.58 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for order_by_key (10:3000000): 88 wallclock secs (63.17 usr 24.64 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for order_by (10:3000000): 98 wallclock secs (62.34 usr 25.09 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_diff_key (500:1000): 124 wallclock secs ( 0.48 usr  0.05 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_range_prefix (5010:42084): 14 wallclock secs ( 4.63 usr  1.80 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_range (5010:42084): 16 wallclock secs ( 4.67 usr  1.58 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_key_prefix (200000): 200 wallclock secs (92.94 usr 38.81 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_key (200000): 201 wallclock secs (92.67 usr 41.23 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Test of compares with simple ranges
Time for select_range_prefix (20000:43500): 13 wallclock secs ( 5.33 usr  2.36 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_range (20000:43500): 14 wallclock secs ( 5.75 usr  2.14 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for select_group (111): 33 wallclock secs ( 0.14 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for min_max_on_key (15000): 14 wallclock secs ( 6.51 usr  2.45 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for min_max (60): 18 wallclock secs ( 0.03 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for count_on_key (100): 25 wallclock secs ( 0.01 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for count (100): 39 wallclock secs ( 0.14 usr  0.03 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for count_distinct_big (20): 98 wallclock secs ( 0.03 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing update of keys with functions
Time for update_of_key (500):  63 wallclock secs ( 4.78 usr  6.47 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for update_of_key_big (501): 34 wallclock secs ( 0.05 usr  0.06 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing update with key
Time for update_with_key (100000):  188 wallclock secs (26.88 usr 40.59 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing update of all rows
Time for update_big (500):  68 wallclock secs ( 0.02 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing left outer join
Time for outer_join_on_key (10:10):  40 wallclock secs ( 0.00 usr  0.01 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for outer_join (10:10):  118 wallclock secs ( 0.01 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for outer_join_found (10:10):  104 wallclock secs ( 0.02 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for outer_join_not_found (500:10):  59 wallclock secs ( 0.02 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing delete
Time for delete_key (10000):  7 wallclock secs ( 0.73 usr  1.13 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for delete_big (12): 21 wallclock secs ( 0.00 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Insert into table with 16 keys and with a primary key with 16 parts
Time for insert_key (100000): 1434 wallclock secs (14.73 usr 12.73 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing update of keys
Time for update_of_key (256): 427 wallclock secs ( 0.02 usr  0.08 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Deleting everything from table
Time for delete_big_many_keys (2): 412 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Inserting 100000 rows with multiple values
Time for multiple_value_insert (100000):  9 wallclock secs ( 2.48 usr  0.19 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Time for drop table(1):  0 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Total time: 4332 wallclock secs (490.00 usr 278.16 sys +  0.00 cusr  0.00 csys =  0.00 CPU)