Speeding Up

Hey all,

I've been profiling my app and noticed that Date._parse is eating up a lot of time in some of my requests.

I'm attempting to pull the date from MySQL w/o ActiveRecord's typecasting, but just can't seem to be able to do it. I tried <attr_name>_before_type_casting & read_attribute_before_type_casting(attr_name) and all I get back is a Date object. What I want to get back is a string rep of the date as the db stored it.

Any clues as to why typecasting is happening anyway?

I'm using rails 2.0.2 & MySQL 5.0.51a-3ubuntu5.

Thanks.

-Nash

Hey all,

I've been profiling my app and noticed that Date._parse is eating up a lot of time in some of my requests.

I'm attempting to pull the date from MySQL w/o ActiveRecord's typecasting, but just can't seem to be able to do it. I tried <attr_name>_before_type_casting & read_attribute_before_type_casting(attr_name) and all I get back is a Date object. What I want to get back is a string rep of the date as the db stored it.

Any clues as to why typecasting is happening anyway?

because usually a date object is more useful (rails 2.1 has some code
to make that a lot faster). Can you use the attributes_before_type_cast hash ?

Fred