com/examples/test_output.rb.apache.log.small. You should see a
message indicating how long the upload took.
CHAPTER 10 n CALCULATING COSTS BY ANALYZING APACHE WEB LOGS 203
Figure 10-1. Apache Analyzer Main Screen
Now clear the database by choosing the link to clear your old logs, and then upload a
new log, but this time, click the Upload with Active Record Extensions button.
In my tests, it took roughly 30 seconds to upload with Active Record, and roughly
10 seconds with ActiveRecord::Extensions. (My technical reviewer reported times of
15 seconds and 4 seconds, respectively.)
It becomes even more important to use ActiveRecord::Extensions if you have a
number of indexes. For example, try adding the following indexes using the MySQL
command-line client:
create index hits_path_info on hits(path_info);
create index hits_referrer on hits(http_referrer);
If you rerun the tests, you should find that the time to use Active Record should
nearly double, but the time to use ActiveRecord::Extensions should barely increase at all.
Pages:
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294