Title: Getting database error
Last modified: May 20, 2022

---

# Getting database error

 *  Resolved [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * (@shellysaju)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/)
 * I’m using the plugin for more than 2 years and it was fine until the last day.
 * I was not able to see any redirects and when I debug the issue, it is a database
   error of having to execute a very large query.
 * Could you please optimize the query in the plugin?
 * The error I’m getting:
 * WordPress database error:
    `[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
   the SELECT is okay]`

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15662982)
 * Hello. I can try, but I’ll need to know which query it is. In the debug file 
   in the plugin there should be an error message. You can turn on the “Help the
   Developer” option on the options tab and it will email me the error message automatically
   every night if there is one. Otherwise you can go to the options tab and scroll
   down to “View the debug file,” click on “View,” paste the contents to [https://pastebin.com/](https://pastebin.com/),
   and then send me the link you created on pastebin.com here, so I can see the 
   log file. Don’t paste the contents of the log file here as it can be too much
   text.
 * thanks
 *  Thread Starter [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * (@shellysaju)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15663373)
 * URL : wp-admin/options-general.php?page=abj404_solution&subpage=abj404_redirects
 * > [View post on imgur.com](https://imgur.com/CcrzVzo)
 * 
    [https://pastebin.com/0NUts5cr](https://pastebin.com/0NUts5cr)
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15663435)
 * Do you have the latest version, 2.30.14?
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15663499)
 * If you do have the latest version would you paste the actual debug file contents
   from “View the debug file” instead of just the queries on pastebin? It might 
   give me more context for finding the matching part of the code.
    -  This reply was modified 4 years ago by [Aaron](https://wordpress.org/support/users/aaron13100/).
 *  Thread Starter [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * (@shellysaju)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15663506)
 * Weirdly I’m on version 2.29.2 and not showing any update.
    I will manually download
   and re-install it.
 *  Thread Starter [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * (@shellysaju)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15663544)
 * I have installed the latest version and still getting the same error.
 * I have copied the complete content in the debug file to here – [https://pastebin.com/SHLavMkT](https://pastebin.com/SHLavMkT)
 * thank you
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15668731)
 * I can fix this for the one query, but it seems likely that the same issue (error
   message) will happen with other queries with the plugin. The best thing to do
   would be to check the “Help the Developer” box on the options page so that when
   it happens I’ll get an email and can fix the other issues when they arise. Even
   better would be to ask your host to change the settings on your database, or 
   to change them yourself, using the following.
 *     ```
       set global max_join_size = 18446744073709551615;
       set global sql_big_selects = 1;
       ```
   
 * Anyway I’ll get to fixing it sometime this week maybe in the next version.
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15675970)
 * Hey, please try version 2.30.15. Maybe it will fix the issue on the Redirects
   tab. Maybe the same issue will appear elsewhere though… Let me know.
 * thanks
 *  Thread Starter [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * (@shellysaju)
 * [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15676524)
 * Yes, it has fixed the issue for now.
 * I’m not sure of this solution, though:
 *     ```
       set global max_join_size = 18446744073709551615;
       set global sql_big_selects = 1;
       ```
   
 * I have enabled the “Help the Developer” box on the options page, so your team
   will be informed.
 * Thank you for the great support!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Getting database error’ is closed to new replies.

 * ![](https://ps.w.org/404-solution/assets/icon-256x256.jpg?rev=1610739)
 * [404 Solution](https://wordpress.org/plugins/404-solution/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/404-solution/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/404-solution/)
 * [Active Topics](https://wordpress.org/support/plugin/404-solution/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/404-solution/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/404-solution/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Shelly Saju](https://wordpress.org/support/users/shellysaju/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/getting-database-error-4/#post-15676524)
 * Status: resolved