On 25/10/2007, Doug Hughes <[EMAIL PROTECTED]> wrote: > > > A quick question for the great minds here at farcry-dev.... Has > anyone seen this error before? Does anyone know what the cause might > be? We get it about once a week and it will not go away (where ever > it crops up) until we restart CF. > > I can't say that the error always occurs on line 257 of > formtools.cfc. But I do see it enough to be driven insane. :)
Its probably happening whereever there is a query that needs to get the top x from an offset point.... Not wanting to rub it in or anything... I've often looked at that nasty nasty bit of SQL and wondered whether that could be done better/easier/more efficiently, but given that I don't have to use MS SQL and mysql, postgres and orible all have this capability I've not lost any sleep over it... So anyway, my guess is that there is something funky going on with temporary tables on your DB server.... I was just talking to my SQL Server DBA collegue and he's given me these two alternates..... Option 1 ======= with myProject(id, ref, recvDate) as (select p_id, p_ref, p_recvDate from project ) select x.*, y.* from (select top 20 * from myProject order by id desc) as x left join (select top 10 * from myProject order by id desc) as y on x.id = y.id where y.id is null Option 2 ====== select top 10 * from (select top 100 * from (select p_id, p_ref, p_recvDate from project) as x order by p_id desc) as x order by p_id asc Options 2 is apparently the most efficient. Just a thought... Regards Stephen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~---
