Category: SQL
-
Post Views: 23 When displaying code snippets containing emoji in WordPress, it is often encountered that Emoji is converted into 🎉 Or <img> label problem. This article records a complete investigation and solution process. problem In the code block of the WordPress Gutenburg editor, write the following PHP code, as shown in Figure 1: After saving the article, the front…
-
Post Views: 79 1. Reference:Optimization of List Interface Response Timeout 2. Reference:In Spatie\QueryBuilder, query SQL enforces index 3. However, when the fields in where contain shipping_at_gmt, Shipping_status, operator_user_id, after forcing the combined index is a negative optimization. SQL execution time-consuming sorting is as follows 4. Preliminarily summarize the rules, when the fields in where contain Shipping_at_gmt and Shipping_Status|Shipping_Type|Operated_Source When the…
-
Post Views: 44 1. Reference:Optimization of List Interface Response Timeout . In Spatie\QueryBuilder , query SQL enforces index . achieve the following 2. The generated sql is as follows, in line with expectations. as shown in Figure 1
-
Post Views: 85 1. In the performance environment, the list interface response timeout. as shown in Figure 1 2. Determine the sql of the interface to execute, connect the mysql of the performance environment in the local environment, and then view the generated sql in Laravel Telescope, and find a select count(*) as aggregate FROM is much longer than other…
-
Post Views: 17 1. In Spatie\QueryBuilder , the request parameter contains “,” error: sqlstate[HY093]: Invalid parameter number: number of bound variables not match number of tokens (SQL: select count(*) as aggregate from `table` where `table`.`Shipping_type` = 2 and `Shipping_at_gmt` >= 2024-05-21 08:54:14 and `Shipping_at_gmt` <= 2024-08-21 08:54:14 and `table`.`Shipping_error_message in (AAA)). as shown in Figure 1 2. When the request…
-
Post Views: 21 1. In MySQL 8, the IN condition is used for multiple fields, and the query result is empty. as shown in Figure 1 2. Reference:In MySQL 8, the in condition is used for multiple fields The query result is not empty for sql as follows 3. Reference:Error when using native expression query in Laravel 9: SQLState[42000]: syntax…
-
Post Views: 15 1. There is no primary key ID of the A table in the B table, but there are 2 other fields of the A table. Now plan to query the records in the A table based on the other 2 fields of the A table. Plan to use in conditions. The general standard usage is shown below…
-
Post Views: 19 1. The values in the JSON field are as follows. The fields to query: $.current.sections.announcement-bar.blocks.*.settings.text. The field key corresponding to * is unknown. as shown in Figure 1 2. The final sql is as follows, the query result is an array, if it does not exist, it is null. as shown in Figure 2 3. Announcement-bar needs…
-
Post Views: 17 1. The json field is stored in the array format, the value example:[249, 247, 250, 244, 243, 255, 246, 245, 257, 248, 259, 252, 256]. as shown in Figure 1 2. The existing code running in the queue job is implemented as follows, the generated SQL is as follows 3. Since the queue tasks can be run…