Prev | Current Page 283 | Next

David Berube

"Practical Reporting with Ruby and Rails"


In my test, I got 50 seconds for Active Record and 13 seconds for ActiveRecord::Extensions,
so Active Record took almost four times as long. With more indexes, it would take
even longer. This is because after each query, all of the indexes are recalculated. It also
takes longer and longer as the table gets larger.
CHAPTER 10 n CALCULATING COSTS BY ANALYZING APACHE WEB LOGS 204
After you??™ve uploaded the log, click the link to view the report. This will display a PDF
file in your browser (assuming you have a PDF viewer plug-in for your browser), as
shown in Figure 10-2.
Figure 10-2. A cost-per-sale report
The chart graphically illustrates how each advertiser costs a different amount per
sale. Of course, the more a sale costs, the less profit is made on each sale, so this is very
valuable information. You can use this information to plan future spending, for example,
since advertising dollars can be more fruitfully spent on advertisers who have a low cost
per sale.
Now let??™s take a look at the important parts of the code.


Pages:
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
Projekty domów Lombard tanie linie lotnicze Emmanuel Moire baseny ogrodowe