[Dbix-class] MSSQL/Page/Prefetch problem

Alan Humphrey alan.humphrey at comcast.net
Mon Jun 1 17:17:09 GMT 2009


> -----Original Message-----
> From: Peter Rabbitson [mailto:rabbit+dbic at rabbit.us]
> Sent: Monday, June 01, 2009 9:44 AM
> To: DBIx::Class user and developer list
> Subject: Re: [Dbix-class] MSSQL/Page/Prefetch problem
> 
> Alan Humphrey wrote:
> >> And what did a previous version generate as far as SQL goes (the one
> >> that
> >> used to work)?
> >>
> >
> > 0.08102 generates:
> >
> > SELECT me.id, me.survey_site_id, me.start_time, me.end_time,
> me.zero_ref_point, me.survey_date, me.weather, me.precipitation,
> me.sea_state, me.tide_movement, me.visibility_distance,
> me.poor_visibility_reason, me.poor_visibility_reason_other,
> me.equipment, me.binocular_magnification, me.scope_magnification,
> me.walker_count, me.dog_count, me.power_boat_count,
> me.unpowered_boat_count, me.other_activities_name,
> me.other_activities_count, me.comments, me.is_complete,
> me.raptor1_bird_id, me.raptor1_count, me.raptor1_affect,
> me.raptor2_bird_id, me.raptor2_count, me.raptor2_affect,
> me.raptor3_bird_id, me.raptor3_count, me.raptor3_affect,
> site.site_code, site.site_name, site.position, site.elevation,
> site.comments FROM surveys me  JOIN survey_sites site ON site.site_code
> = me.survey_site_id ORDER BY survey_site_id, survey_date:
> >
> > Note: The correct number of rows is returned to the application code.
> >
> 
> But this does not apply the page => 1/rows => 25 at all does it?

The generated SQL doesn't do any paging, but the correct data set (page, number of rows) is passed back to the application.

- Alan




More information about the DBIx-Class mailing list