TeraData dedicated pagination support #556

Closed
timowest opened this Issue Nov 15, 2013 · 9 comments

Comments

Projects
None yet
2 participants
@timowest
Member

timowest commented Nov 15, 2013

Efficient TeraData mechanism for result pagination; currently see three options2
a. Run the query again with a select count(*).
b. Cursor to end of result set and skip any between rows [rs.last();int nRowCount = rs.getRow();]
c. Add an Ordered Analytic to the query to have it include the count.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 16, 2013

Member

Concerning c. count(*) over() could be used as an additional projection element to get the count out.

Member

timowest commented Dec 16, 2013

Concerning c. count(*) over() could be used as an additional projection element to get the count out.

@lukaseder

This comment has been minimized.

Show comment
Hide comment
@lukaseder

lukaseder Dec 17, 2013

Learning from the best? :-)

Learning from the best? :-)

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 17, 2013

Member

I knew this would provoke some comment from you. ;)
Yes, I will try to unify the pagination logic in Querydsl SQL.

Member

timowest commented Dec 17, 2013

I knew this would provoke some comment from you. ;)
Yes, I will try to unify the pagination logic in Querydsl SQL.

@lukaseder

This comment has been minimized.

Show comment
Hide comment
@lukaseder

lukaseder Dec 17, 2013

Hmm, I have to work on my trolling predictability ;-)
Good luck! That's probably the most challenging part of SQL transformation...

Hmm, I have to work on my trolling predictability ;-)
Good luck! That's probably the most challenging part of SQL transformation...

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 17, 2013

Member

@lukaseder Does jOOQ also have single query support for paged data and total count? count(*) over() seems to work for databases that support this function. For other cases Querydsl does two queries.

Good luck! That's probably the most challenging part of SQL transformation...

Yes, it's quite a pita.

Member

timowest commented Dec 17, 2013

@lukaseder Does jOOQ also have single query support for paged data and total count? count(*) over() seems to work for databases that support this function. For other cases Querydsl does two queries.

Good luck! That's probably the most challenging part of SQL transformation...

Yes, it's quite a pita.

@lukaseder

This comment has been minimized.

Show comment
Hide comment
@lukaseder

lukaseder Dec 17, 2013

Does jOOQ also have single query support for paged data and total count? count(*) over() seems to work for databases that support this function.

COUNT(*) OVER() is certainly the best way for those 5-6 databases that support window functions. jOOQ doesn't have any such flags to auto-calculate these things...

Does jOOQ also have single query support for paged data and total count? count(*) over() seems to work for databases that support this function.

COUNT(*) OVER() is certainly the best way for those 5-6 databases that support window functions. jOOQ doesn't have any such flags to auto-calculate these things...

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 17, 2013

Member

Thanks for the confirmation.

Member

timowest commented Dec 17, 2013

Thanks for the confirmation.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Dec 22, 2013

Member

Released in 3.3.0

Member

timowest commented Dec 22, 2013

Released in 3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment