[CONPY-10] Implement prepare caching Created: 2018-07-24 Updated: 2018-07-26 |
|
| Status: | Open |
| Project: | MariaDB Connector/Python |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Diego Dupin | Assignee: | Georg Richter |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Implementation can reuse a prepared statement on cursor level if the query is strictly the same than the previous one. MariaDB saves the prepared statement at the Connection level. The connector must work accordingly, saving X prepared result at connection level in an LRU cache, then prepare only if not in this LRU cache. |
| Comments |
| Comment by Georg Richter [ 2018-07-25 ] |
|
Do I miss something? This is already implemented in MrdbCursor_isprepared() |
| Comment by Diego Dupin [ 2018-07-25 ] |
|
If I'm not wrong :
|
| Comment by Georg Richter [ 2018-07-26 ] |
|
Yes, currently it's cached by cursor not by connection. |