Questions tagged [paging]

A memory-management technique where a computer stores and retrieves data from secondary storage for use in main memory. Memory is divided into equal sized pages so to not waste any memory.

2459 questions
19
votes
5 answers

Select COUNT(*) of subquery without running it twice

I've got a procedure to return a result set which is limited by page number and some other stuff. As an OUTPUT parameter I need to return a total amount of selected rows according to the parameters except the page number. So I have something like…
Nidzo
18
votes
6 answers

Algorithm / pseudo-code to create paging links?

Can someome provide code or pseudo-code for how the paging links on StackOverflow are generated? I keep racking my brain but can't think of a decent way to build the dynamic links that always show the 2 pages around the current, plus the first and…
Geoff
  • 9,340
  • 7
  • 38
  • 48
17
votes
7 answers

Limit pagination page number

$objConnect = mysql_connect("localhost","root","") or die(mysql_error()); $objDB = mysql_select_db("Test"); $strSQL = "SELECT * FROM UserAddedRecord WHERE (Name LIKE '%".$getname."%' and State LIKE '%".$getstate."%' and Cell LIKE '%".$getcell."%'…
Irene Ling
  • 1,881
  • 3
  • 26
  • 41
17
votes
4 answers

Pagination in Cosmos DB using Page Size and Page Number

I am trying to return items from cosmosDB using PageSize and PageNumber. I know we can set the page size in MaxItemCount, but how do we put the page number in this function? Here's what I got so far: public async Task>…
superninja
  • 3,114
  • 7
  • 30
  • 63
17
votes
1 answer

Paging UIScrollView with different page widths

I would like to have a horizontal scrolling UIScrollView with paging enabled. The pages in this scrollview have different widths, so the scrolling distance differs from page to page. The goal is to make a picker for different points in time, e.g.: |…
Florian L.
  • 849
  • 2
  • 8
  • 22
17
votes
2 answers

How does pagination of results in databases work?

This is a general question that applies to MySQL, Oracle DB or whatever else might be out there. I know for MySQL there is LIMIT offset,size; and for Oracle there is 'ROW_NUMBER' or something like that. But when such 'paginated' queries are called…
shikhanshu
  • 1,466
  • 2
  • 16
  • 32
17
votes
1 answer

What is the lifespan of continuation tokens in DocumentDb

I can't find anywhere in the documentation that indicates how long request continuation tokens last for DocumentDb paging support. I therefore suspect it is intentionally undefined. In the real world, how long can I expect a token to last for? I ask…
Sam
  • 946
  • 7
  • 19
17
votes
3 answers

How to prevent paging for one program / process?

I have a program that requires much memory, like 2/3 of all the physical ram. After some runtime my operating system begins to swap the program to hdd. But I need the program to respond very fast all the time, so I need to prevent paging for that…
dan
  • 5,377
  • 13
  • 39
  • 44
17
votes
4 answers

"Incorrect syntax near 'OFFSET'" modift sql comm 2012 to 2008

I'm listing questions with this SELECT q.qTitle, q.qDescription, q.qCreatedOn, u.uCode, u.uFullname, qcat.qcatTitle, q.qId, q.qStatus FROM tblQuestion AS q INNER JOIN tblUser AS u ON q.uId = u.uId INNER JOIN tblQuestionCategory AS qcat ON…
Tayfun Yaşar
  • 422
  • 2
  • 9
  • 24
17
votes
4 answers

Calculating number of page faults for 2-d array

I am trying to study for an exam..and I found this example but can't understand how they got the answer. Can anyone explain it please? Question: Consider the two-dimensional array A: int A[][] = new int[100][100]; where A[0][0] is at location…
user1411893
  • 608
  • 2
  • 8
  • 19
16
votes
1 answer

Efficient paging with large tables in sql 2008

for tables with > 1,000,000 rows and possibly many many more ! haven't done any benchmarking myself so wanted to get the experts opinion. Looked at some articles on row_number() but it seems to have performance implications What are the other…
Kumar
  • 10,997
  • 13
  • 84
  • 134
16
votes
8 answers

What is page table entry size?

I found this example. Consider a system with a 32-bit logical address space. If the page size in such a system is 4 KB (2^12), then a page table may consist of up to 1 million entries (2^32/2^12). Assuming that each entry consists of 4 bytes,…
Pankaj Mahato
  • 1,051
  • 5
  • 14
  • 26
15
votes
3 answers

How to use empty view with pagination using paging library android?

How to determine size of data returned before setting adapter? How to use emptyview with paging library? How to set emptyview if pagedlist returns null or no data?
15
votes
0 answers

How to use Paging with SQLite?

I want to integrate Paging with SQLite in existing application. There are around 90 tables in my database so its time consuming to convert to Room. I also tried LIMIT...OFFSET but that takes time to process data every time. Thanks.
Sagar Zala
  • 4,854
  • 9
  • 34
  • 62
15
votes
2 answers

Paging the huge data that is returned by the Web API

We created the WebAPI for querying an Oracle database. The query returns results that are huge, so it sometimes throws OutOfMemoryException. The recommendation was to use the Paging concept. I don't understand how the client application will know…
user4912134
  • 1,003
  • 5
  • 18
  • 47