insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg 5.98 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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
Testing server 'MySQL 3.23.39' at 2001-06-05 13:55:36

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): 123 wallclock secs (21.22 usr 12.32 sys +  0.00 cusr  0.00 csys = 33.54 CPU)

Testing insert of duplicates
Time for insert_duplicates (100000): 31 wallclock secs ( 5.06 usr  3.72 sys +  0.00 cusr  0.00 csys =  8.78 CPU)

Retrieving data from the table
Time for select_big (10:3000000): 32 wallclock secs (21.78 usr 10.07 sys +  0.00 cusr  0.00 csys = 31.85 CPU)
Time for order_by_big_key (10:3000000): 33 wallclock secs (23.35 usr 10.15 sys +  0.00 cusr  0.00 csys = 33.50 CPU)
Time for order_by_big_key_desc (10:3000000): 36 wallclock secs (23.47 usr 10.27 sys +  0.00 cusr  0.00 csys = 33.74 CPU)
Time for order_by_big_key_prefix (10:3000000): 33 wallclock secs (22.18 usr  9.81 sys +  0.00 cusr  0.00 csys = 31.99 CPU)
Time for order_by_big_key2 (10:3000000): 32 wallclock secs (22.53 usr  9.81 sys +  0.00 cusr  0.00 csys = 32.34 CPU)
Time for order_by_big_key_diff (10:3000000): 74 wallclock secs (22.66 usr  9.76 sys +  0.00 cusr  0.00 csys = 32.42 CPU)
Time for order_by_big (10:3000000): 78 wallclock secs (22.39 usr  9.83 sys +  0.00 cusr  0.00 csys = 32.22 CPU)
Time for order_by_range (500:125750):  8 wallclock secs ( 1.26 usr  0.49 sys +  0.00 cusr  0.00 csys =  1.75 CPU)
Time for order_by_key_prefix (500:125750):  4 wallclock secs ( 0.97 usr  0.57 sys +  0.00 cusr  0.00 csys =  1.54 CPU)
Time for order_by_key2_diff (500:250500):  9 wallclock secs ( 1.30 usr  0.85 sys +  0.00 cusr  0.00 csys =  2.15 CPU)
Time for select_diff_key (500:1000): 193 wallclock secs ( 0.32 usr  0.04 sys +  0.00 cusr  0.00 csys =  0.36 CPU)
Time for select_range_prefix (5010:42084): 13 wallclock secs ( 2.55 usr  0.51 sys +  0.00 cusr  0.00 csys =  3.06 CPU)
Time for select_range_key2 (5010:42084): 12 wallclock secs ( 2.81 usr  0.68 sys +  0.00 cusr  0.00 csys =  3.49 CPU)
Time for select_key_prefix (200000): 141 wallclock secs (86.32 usr 12.05 sys +  0.00 cusr  0.00 csys = 98.37 CPU)
Time for select_key (200000): 132 wallclock secs (53.98 usr 10.53 sys +  0.00 cusr  0.00 csys = 64.51 CPU)
Time for select_key_return_key (200000): 125 wallclock secs (59.92 usr 12.00 sys +  0.00 cusr  0.00 csys = 71.92 CPU)
Time for select_key2 (200000): 139 wallclock secs (78.61 usr 11.08 sys +  0.00 cusr  0.00 csys = 89.69 CPU)
Time for select_key2_return_key (200000): 131 wallclock secs (64.58 usr  9.61 sys +  0.00 cusr  0.00 csys = 74.19 CPU)
Time for select_key2_return_prim (200000): 134 wallclock secs (72.33 usr 11.34 sys +  0.00 cusr  0.00 csys = 83.67 CPU)

Test of compares with simple ranges
Time for select_range_prefix (20000:43500):  9 wallclock secs ( 4.00 usr  0.89 sys +  0.00 cusr  0.00 csys =  4.89 CPU)
Time for select_range_key2 (20000:43500):  9 wallclock secs ( 4.34 usr  0.72 sys +  0.00 cusr  0.00 csys =  5.06 CPU)
Time for select_group (111): 55 wallclock secs ( 0.02 usr  0.04 sys +  0.00 cusr  0.00 csys =  0.06 CPU)
Time for min_max_on_key (15000):  8 wallclock secs ( 5.12 usr  0.76 sys +  0.00 cusr  0.00 csys =  5.88 CPU)
Time for min_max (60): 30 wallclock secs ( 0.04 usr  0.01 sys +  0.00 cusr  0.00 csys =  0.05 CPU)
Time for count_on_key (100): 52 wallclock secs ( 0.03 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.05 CPU)
Time for count (100): 45 wallclock secs ( 0.01 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.01 CPU)
Time for count_distinct_big (20): 98 wallclock secs ( 0.01 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.01 CPU)

Testing update of keys with functions
Time for update_of_key (50000):  25 wallclock secs ( 2.62 usr  1.44 sys +  0.00 cusr  0.00 csys =  4.06 CPU)
Time for update_of_key_big (501): 35 wallclock secs ( 0.05 usr  0.04 sys +  0.00 cusr  0.00 csys =  0.09 CPU)

Testing update with key
Time for update_with_key (300000):  119 wallclock secs (18.44 usr 12.64 sys +  0.00 cusr  0.00 csys = 31.08 CPU)
Time for update_with_key_prefix (100000):  36 wallclock secs ( 6.23 usr  3.85 sys +  0.00 cusr  0.00 csys = 10.08 CPU)

Testing update of all rows
Time for update_big (10):  64 wallclock secs ( 0.00 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):  60 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for outer_join (10:10):  110 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for outer_join_found (10:10):  107 wallclock secs ( 0.00 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.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing INSERT INTO ... SELECT
Time for insert_select_1_key (1):   7 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for insert_select_2_keys (1):   9 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)
Time for drop table(2):  0 wallclock secs ( 0.00 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.00 CPU)

Testing delete
Time for delete_key (10000):  4 wallclock secs ( 0.76 usr  0.29 sys +  0.00 cusr  0.00 csys =  1.05 CPU)
Time for delete_all (12): 17 wallclock secs ( 0.00 usr  0.00 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): 137 wallclock secs ( 9.91 usr  6.26 sys +  0.00 cusr  0.00 csys = 16.17 CPU)

Testing update of keys
Time for update_of_primary_key_many_keys (256): 47 wallclock secs ( 0.01 usr  0.02 sys +  0.00 cusr  0.00 csys =  0.03 CPU)

Deleting rows from the table
Time for delete_big_many_keys (128): 75 wallclock secs ( 0.03 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.03 CPU)

Deleting everything from table
Time for delete_all_many_keys (1): 75 wallclock secs ( 0.03 usr  0.00 sys +  0.00 cusr  0.00 csys =  0.03 CPU)

Total time: 2736 wallclock secs (661.21 usr 182.47 sys +  0.00 cusr  0.00 csys = 843.68 CPU)