Project

General

Profile

Actions

Feature #9745

closed
RS RM

Dbo: LRU prepared statement cache

Feature #9745: Dbo: LRU prepared statement cache

Added by Roel Standaert over 4 years ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
02/14/2022
Due date:
% Done:

0%

Estimated time:

Description

We currently have a prepared statement cache for every database connection. We do a string-based lookup to see if we already have a prepared statement in the cache, and otherwise we add a new prepared statement.

If we have more uses of the same prepared statement we add extra copies to the cache.

We however don't ever remove prepared statements from the cache, except for completely emptying the cache on a reconnect. This means that we may keep accruing prepared statements, especially if string concatenation is used to create queries (which we of course don't want to do, we want to bind parameters, but sometimes it may not be avoidable). This may cause us to waste memory on the database server side as well.

We could consider adding a configurable maximum of prepared statements, and discard those that were least recently used.

RM Updated by Romain Mardulyn over 1 year ago Actions #1

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn over 1 year ago Actions #2

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

RM Updated by Romain Mardulyn 2 months ago Actions #3

  • Target version changed from future to 4.15.0

ED Updated by emil de keyser 2 months ago Actions #4

  • Assignee set to emil de keyser

ED Updated by emil de keyser about 2 months ago Actions #5

  • Status changed from Review to Resolved
  • Assignee changed from emil de keyser to Romain Mardulyn

RM Updated by Romain Mardulyn about 1 month ago Actions #6

  • Status changed from Resolved to Implemented @Emweb

RM Updated by Romain Mardulyn 11 days ago Actions #7

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom