Get the App
SLTechnology News&Howtos  ›  Database  › 

Example Analysis of Buffered and Unbuffered queries and pdo non-cached queries in MySQL

Shulou Source: shulou.com Published: 2022-05-31 18:17:08 10月02日 Update

This article mainly shows you the "MySQL Buffered and Unbuffered queries and pdo non-cached query example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "MySQL Buffered and Unbuffered queries and pdo non-cached query example analysis" this article.

Buffered and Unbuffered queries of MySQL

Let's go further to talk talk MySQL's advanced role of query caching, that is, query caching and query non-caching!

Cause: (memory overflow warning)

PHP Fatal error: Allowed memory size of 268 435 456 bytes exhausted

1. Official

Mainly said that the cache query is to check out all the contents at once, put in memory, will accumulate more and more, while the non-cache query will directly return from the MySQL server, that is, it will wait for the php process to get the next piece of data. (mainly understand this meaning, if you want to understand it all, micro-ego or Baidu translation)

2.Buffer and unBuffer query

A) cached queries are generally used to query data at one time and will be stored in memory

B) non-cached queries are returned directly from the MySQL and will not be stored in memory

3. An example of a non-cached query of mysqligrad PDO

Tags: Query cache memory content example analysis article that is data learning help advanced one-time function example official meaning easy to understand more server Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Tech Info Microsoft OPPO Reno Shulou Technology