Answers.Body: <p>turns out it was an error in my TablePlus, it truncated the decoded_query to 221 characters.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-25T08:28:21.507Z
Answers.LastActivityDate: 2019-04-25T08:28:21.507Z
Answers.UserDisplayName: toy
Body: <p>after enableling querycaching in craft3 I found rows in templatecachequeries with big amount of characters in the query field. I decoded it with base64 and got this as the largest entry:</p>
  
  <pre><code>query_length: 157036
  
  query_decoded:
  O:28:"craft\elements\db\EntryQuery":71:{s:8:"editable";b:0;s:9:"sectionId";a:1:{i:0;s:1:"7";}s:6:"typeId";N;s:8:"authorId";N;s:13:"authorGroupId";N;s:8:"postDate";N;s:6:"before";N;s:5:"after";N;s:10:"expiryDate";N;s:17:" 
  
  query: TzoyODoiY3JhZnRcZWxlbWVudHNcZGJcRW...(+157.000)
  </code></pre>
  
  <p>my sql query:</p>
  
  <pre><code>select length(query) as query_length , FROM_BASE64(query) as query_decoded, query
  from craft_templatecachequeries
  order by query_length desc
  </code></pre>
  
  <p>why does the unencoded query with a size of 221 characters get encoded to a size of 157036 characters?</p>
  
Tags: <craft3><cache><mysql>
Title: templatecachequeries entries with of 157.000 characters in query column
ThreadText: # templatecachequeries entries with of 157.000 characters in query column
  
  (Asked by: username_0 on 2019-04-15)
  
  after enableling querycaching in craft3 I found rows in templatecachequeries with big amount of characters in the query field. I decoded it with base64 and got this as the largest entry:
  
  ```
  query_length: 157036
  
  query_decoded:
  O:28:"craft\elements\db\EntryQuery":71:{s:8:"editable";b:0;s:9:"sectionId";a:1:{i:0;s:1:"7";}s:6:"typeId";N;s:8:"authorId";N;s:13:"authorGroupId";N;s:8:"postDate";N;s:6:"before";N;s:5:"after";N;s:10:"expiryDate";N;s:17:" 
  
  query: TzoyODoiY3JhZnRcZWxlbWVudHNcZGJcRW...(+157.000)
  
  ```
  
  my sql query:
  
  ```
  select length(query) as query_length , FROM_BASE64(query) as query_decoded, query
  from craft_templatecachequeries
  order by query_length desc
  
  ```
  
  why does the unencoded query with a size of 221 characters get encoded to a size of 157036 characters?
  
  **Tags:** craft3, cache, mysql
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-04-25. Score: 1
  
  turns out it was an error in my TablePlus, it truncated the decoded\_query to 221 characters.
  
  
  ---
  
  