← Quiz: Pagination and Sorting: all 10 questions
Quiz: Pagination and Sorting · Question 5 of 10
What is the main difference between Page<T and Slice<T?
What is the main difference between Page<T> and Slice<T>?
- A.Slice cannot be sorted
- B.Page is faster
- C.Page runs an extra COUNT query to know the total; Slice only knows whether a next slice exists
- D.Slice returns all rows
Answer & explanation
Correct answer: Page runs an extra COUNT query to know the total; Slice only knows whether a next slice exists
Skipping the count query makes Slice cheaper for "load more" style screens.
Can you get the rest right without peeking?
Take the timed Quiz: Pagination and Sorting quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →