Okay
  Print

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=#

If your website boasts a large number of WordPress posts (accommodations, cruises, car rentals, tours and locations are custom WordPress post types and there instances also contribute to the overall database size) you may run into the following error thrown by your mysql database:

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=#

There are two ways to resolve this issue:

1. You ask your webhost to enable SQL_BIG_SELECTS by setting the equally named mysql setting to 1

SQL_BIG_SELECTS=1

or to set the MAX_JOIN_SIZE value a value larger then what you currently have set.

2. If your webhost has a restriction on the above values or refuses to set them, you can also add the following to your theme's functions.php which will do the same thing:

function enable_big_selects_for_bookyourtravel() {
    global $wpdb;
    $wpdb->query( 'SET SQL_BIG_SELECTS=1' );
}
add_action( 'init', 'enable_big_selects_for_bookyourtravel' );