Skip to content

Commit 1b19c2f

Browse files
authored
index hint on session tables (#1036)
* index hint on session tables expires column should be indexed so that purging do get timed out. * typo https://docs.lucee.org/guides/Various/FAQs/technical-FAQs/database-session.html
1 parent 7e6ecd0 commit 1b19c2f

File tree

1 file changed

+2
-0
lines changed
  • docs/04.guides/13.Various/15.FAQs/01.technical-FAQs/02.database-session

1 file changed

+2
-0
lines changed

docs/04.guides/13.Various/15.FAQs/01.technical-FAQs/02.database-session/page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ That's it!
4444

4545
* Primary key existence (DESCRIBE cf_session_data). If primary key doesn't exist add composite primary key (cfid, name). You can run ALTER TABLE cf_session_data ADD PRIMARY KEY(cfid,name) for that. This helps you avoid performance problems as your cf_session_data table will grow.
4646

47+
* index present on expires column. You'll need it if you have a large amount of traffic because purging will check expired records and the index will help to do it faster.
48+
4749
* Type of "data" column should be longtext, not text. Run ALTER TABLE cf_session_data MODIFY data longtext to change. (Fixed in versions 4.2.0, 4.1.2.006). This is a must have if you store big data (arrays, structs) in session. Otherwise you'll get the data truncation error
4850

4951
For reference only and in case information about structure and indexes of the mysql tables is needed, find a MySql structure export of the cf_session_data and cf_client_data below:

0 commit comments

Comments
 (0)