Filter hook 'split_the_query'
in WP Core File wp-includes/class-wp-query.php at line 3333
Description
Filters whether to split the query. Splitting the query will cause it to fetch just the IDs of the found posts (and then individually fetch each post by ID), rather than fetching every complete row at once. One massive result vs. many small results. }
Occurrences
Filename |
Line Number |
wp-includes/class-wp-query.php |
3333 |
Parameters
Type |
Name |
Description |
bool |
$split_the_query |
Whether or not to split the query. |
WP_Query |
$query |
The WP_Query instance. |
string |
$old_request |
The complete SQL query before filtering. |
string[] |
$clauses |
{ Associative array of the clauses for the query. |
PHP Doc
/**
* Filters whether to split the query.
*
* Splitting the query will cause it to fetch just the IDs of the found posts
* (and then individually fetch each post by ID), rather than fetching every
* complete row at once. One massive result vs. many small results.
*
* @since 3.4.0
* @since 6.6.0 Added the `$old_request` and `$clauses` parameters.
*
* @param bool $split_the_query Whether or not to split the query.
* @param WP_Query $query The WP_Query instance.
* @param string $old_request The complete SQL query before filtering.
* @param string[] $clauses {
* Associative array of the clauses for the query.
*
* @type string $where The WHERE clause of the query.
* @type string $groupby The GROUP BY clause of the query.
* @type string $join The JOIN clause of the query.
* @type string $orderby The ORDER BY clause of the query.
* @type string $distinct The DISTINCT clause of the query.
* @type string $fields The SELECT clause of the query.
* @type string $limits The LIMIT clause of the query.
* }
*/