Paging best practices

27 views
Skip to first unread message

Jose Gosende

unread,
Dec 17, 2014, 1:30:20 PM12/17/14
to taffy...@googlegroups.com
Hi,

I'm dealing with large data sets (> 50k rows) and was wandering if anyone had implemented a pagination system with Taffy? Using ACF 10 and MS SQL 2008, in case that helps.

Thanks,
Jose

Adam Tuttle

unread,
Dec 17, 2014, 1:48:04 PM12/17/14
to taffy...@googlegroups.com
It's tricky. You definitely don't want to select all of the rows and then loop over just the desired set (e.g. cfoutput with startrow and maxrows attributes)

You really want to do pagination within your SQL. Different databases support different syntaxes. I like MySQL's the most:

select ...
from ...
limit {offset}, {rowcount}

So if you did "limit 100, 50" you'd get 50 rows starting at 101. Or is it 100? I can never remember. :)

Adam

--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cory Silva

unread,
Dec 17, 2014, 2:51:39 PM12/17/14
to taffy...@googlegroups.com
Were are using the Odata v2 spec with Taffy.  But you could also use jQuery.param() to pass some parameters over the URL.

Reply all
Reply to author
Forward
0 new messages