Subject RE: Re[6]: [firebird-support] Join with first detail record
Author Alan McDonald
> I understood that it would only sort the subset of detail records
> that match the masterid field value. However, this small subset
> is currently tens of thousands of records and one day will likely
> be somewhere in the neighborhood of a hundred thousand records.
> If I need to select every row from the master table, will I not
> then be doing separate subset sorts for each master row? Will
> those sorts not each be very slow?

they will be very slow indeed. I would have to suggest that you re-think
your data model somehow. I would never demand that the server sort tens of
thousands of records to hand me back one.
You mention date-time stamp fields. Why don't you set additional WHERE
clauses for between NOW and 24hours agao to limit this sorting requirement.