Column info is cached when you run in the production mode.
" [4;35;1m" sequence is a ANSI colors that make it much easier to look
at the
log file. If you run Unix you can benefit from this. On Windows I prefer to
disable this feature but adding
config.active_record.colorize_logging = false
to my environment.rb file.
Kent.
On Thursday 24 November 2005 02:32, Christer Nilsson
wrote:> development.log contains quite a few SELECTS on system tables like
> COLUMNS. Wouldn''t it be more efficient to cache this info?
>
> I''m also wondering about strings like "[4;35;1m".
What''s their purpose
> and is it possible to get rid of them? They look like screen coordinates
> and makes no sense in a text file.
>
> Christer
>
> Processing ReportController#create (for 127.0.0.1 at 2005-11-24
> 08:18:41) [POST]
> Parameters: {"action"=>"create",
"controller"=>"report",
> "report"=>{"flightnumber"=>"XYZ789",
"id"=>"", "description"=>"CIA
> flight...", "flightdate(1i)"=>"2005",
"flightdate(2i)"=>"11",
> "flightdate(3i)"=>"24"}}
> [4;35;1mReport Columns (0.070000) SELECT COLUMN_NAME as
> ColName, COLUMN_DEFAULT as DefaultValue, DATA_TYPE as ColType,
> COL_LENGTH(''reports'', COLUMN_NAME) as Length,
> COLUMNPROPERTY(OBJECT_ID(''reports''), COLUMN_NAME,
''IsIdentity'') as
> IsIdentity, NUMERIC_SCALE as Scale FROM INFORMATION_SCHEMA.COLUMNS WHERE
> TABLE_NAME = ''reports''
> [4;36;1mSQL (0.050000) [0;1mSELECT COLUMN_NAME as ColName,
> COLUMN_DEFAULT as DefaultValue, DATA_TYPE as ColType,
COL_LENGTH('''',
> COLUMN_NAME) as Length, COLUMNPROPERTY(OBJECT_ID(''''),
COLUMN_NAME,
> ''IsIdentity'') as IsIdentity, NUMERIC_SCALE as Scale FROM
> INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ''''
> [4;35;1mSQL (0.070000) SELECT @@IDENTITY AS Ident
> [4;36;1mReport Create (0.200000) [0;1mINSERT INTO reports
> ([flightdate], [flightnumber], [description], [user_id])
> VALUES(''2005-11-24 00:00:00'', ''XYZ789'',
''CIA flight...'', 1)
> Redirected to http://localhost:3000/report/list
> Com