New buffer pool replacement policy for one-off sequential scans

Registered by Laurynas Biveinis

Closing, can be reopened if a compelling use case springs up. Right now, InnoDB old block time tuning is available

This is for the benefit of pt-table-checksum and for one-off sequential table scans in general.

The problem with them now is that such scans will load the buffer with the cold data, possibly swapping some of the hot data to disk.

This can be addressed by
- Adding a new flag to the parser indicating that a different buffer pool replacement policy is desired for a particular query (the name of the policy, the name and syntax of the flag TBD);
- Adding a new flag to the trx struct, setting it if the parser flag is set;
- On data page reads into the buffer pool, if the flag is set, do "something else" instead of adding the block to the middle of the LRU list. One option is to add it to the end of the LRU list but pin it in so that it doesn't get imediatelly evicted. On the next read by the same trx unpin the old block. Another option is to introduce "very old" LRU sublist, say, 1/16 of the LRU length, and add blocks there. Other options should be possible as well.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Not
Drafter:
Laurynas Biveinis
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.