On Wed, Mar 14, 2007 at 04:45:04PM +0100, neongrau __ wrote: > hi! > > after wondering why i can't find alot of records i eventually found the > problem in the sqlserver_adapters implementation of "add_limit_offset!". > > the problem is when using MSSQL with the sqlserver_adapter paging will > only work when at least one column is defined in ":order". > > for example i was indexing a table with 2912 records, the generated sql > for the batches were these: > > SELECT * FROM (SELECT TOP 1000 * FROM (SELECT TOP 1000 * FROM > table_name) AS tmp1 ) AS tmp2 > SELECT * FROM (SELECT TOP 1000 * FROM (SELECT TOP 2000 * FROM > table_name) AS tmp1 ) AS tmp2 > SELECT * FROM (SELECT TOP 912 * FROM (SELECT TOP 2912 * FROM table_name) > AS tmp1 ) AS tmp2 > > > as you can imagine it was indexing the same top 1000 records 3 times :( > > i think a default ordering by the primary key would help to eliminate > that problem.
I just committed this, so could you please try if current trunk fixes this for you? Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

