You can find more information about LOAD DATA INFILE, as well as on speeding up
INSERT statements (including the relatively obscure INSERT DELAYED statement) at http://dev.mysql.
com/doc/refman/5.0/en/insert-speed.html.
Creating PDFs with PDF::Writer
PDF::Writer is a pure Ruby PDF-creation library. This has the advantage of not requiring
any outside libraries installed on the host operating system, which is unlike the LaTeX
solution discussed in Chapter 6 or the html2ps solution discussed in Chapter 8.
PDF::Writer is less flexible and slower than LaTeX, but it??™s also easier to learn and more
Ruby-like. The html2ps solution is easy to learn, but slow, since it runs through multiple
CHAPTER 10 n CALCULATING COSTS BY ANALYZING APACHE WEB LOGS 191
passes, and it??™s inflexible. HTML alone does not support all of the formatting features
PDF does, so the conversion is imprecise, and html2ps does not support all possible
types of HTML formatting.
For example, the following code creates a PDF containing only the text Hello world!:
require 'pdf/writer'
pdf_document = PDF::Writer.
Pages:
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278