Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Fearless Freap on March 25, 2013, 10:52:02 PM

Title: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 25, 2013, 10:52:02 PM
Hello... This is an odd situation.  Everything was working fine, then one day, this:

The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
File: /htdocs/Sources/ManageAttachments.php
Line: 871

I don't know how to fix this, and can be a problem for me when posting.  Any help would be appreciated.

I have just upgraded to SMF 2.0.4
No special themes some mods, but it happens regardless of mods.

Thanks,

-Steve
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Kindred on March 26, 2013, 07:34:01 AM
And how many attachments do you have?
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 26, 2013, 08:53:51 AM
I have 36 attachments... but here is the thing... this isn't the only post like that.  I have several, but only now I am having problems.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Kindred on March 26, 2013, 08:57:38 AM
36 attachments in a single post or 36 attachments total?
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 26, 2013, 12:40:57 PM
36 in one attachment...

Here's one example : http://www.myfavoritecheerleader.com/index.php?topic=8571.0
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Kindred on March 26, 2013, 01:12:09 PM
well, that is likely to be a problem...    a single post is not supposed to have that many attachments.

How many attachments do you have TOTAL?
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 26, 2013, 02:30:19 PM
The first post will have one attachment...

The follow up post will have anywhere from 12 to 36.  and what ever gets posted after that... who knows.

I guess my question is, what is the difference if I post one message, with 36 attachments, versus pulling one link from 36 different posts, and putting them all together on one post?  I thought there really wasn't a limit set on the number of attachments you could have on a post.  In the settings portion it doesn't give a range.

If it's just something I have to deal with I can figure a "work around" it just time that I am trying to save here.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Arantor on March 26, 2013, 02:30:46 PM
What URL were you on when you got that error, exactly?
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 26, 2013, 03:09:20 PM
It's odd because sometimes I get it, sometimes I don't.  If you see the link above, I have over 25 posts like that, then all of the sudden now it is an issue. 

I would post maybe 15 of the attachments at one time, then edit and attach the rest.  after that when I try to edit the post, and then save that's when I would get the error.  It wouldn't matter what board I created it in.  And I couldn't delete any of the attachments, or edit the post... I had to delete the entire post.  I even tried to remove the second post that created the problem, but, same thing.  I had to remove the entire post.

That's when I thought it may be a database thing, so I upgraded to the latest smf, but still have that problem.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Kindred on March 26, 2013, 03:12:12 PM
I think that you are overusing the attachment system in a way it was never intended to be used....
(and you still have not answered my original question. How many TOTAL attachments do you have stored in the attachments directory?)

why so many attachments, anyway?


If they are images, you'd be better off getting one of the gallery mods (I like aeva, but there are others) and using that to host the images and then place the hosted images within the posts.  That way, there's no issue, one way or the other.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 26, 2013, 04:40:08 PM
OK,

Sorry about not answering the question... I guess I didn't understand it... I thought you were talking about just the post... overall, it's huge.  Mammoth.  My goal is more along the lines of an image board... The reason for the attachments is that I am trying to do something a little different.  I use smf to track professional cheerleaders.  (as odd as that may seem).

I have one topic for each cheerleader, of each NFL and NBA team.  Each cheerleader profile, either active or alumni... is one topic.  Now, I have another board of squad rosters... which I want to list all of the cheerleaders for that particular year with a photo and a name which links to the individual profile and vice versa.

I think what I am starting to experience is that I am pushing the limits of what SMF can do and need to start to modify the code to get it to do what I need it to do.  There are a lot of bells and whistles here that I don't use so a stripped down version appeals to me.  I know what I want, it's just a matter of getting there.

I'm going to mark this as solved... although it doesn't completely answer the problem other than I'm overloading the system.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Arantor on March 26, 2013, 04:47:41 PM
Then you should definitely be using a gallery as opposed to SMF attachments. You will have significant other issues with too many image files in a single place.
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Kindred on March 26, 2013, 05:13:50 PM
instead of modifying the code to make it do something that it is not intende dto do, why not use one of the nicely coded and packaged mods which DOES do that...

for example, Avea Gallery (although no longer officially supported by the author) is wlel coded and I have been using it for several years with no problems.
If you get the 2.10 version, it even allows for uploading an image directly from the post...
Title: Re: Database Error : MAX_JOIN_SIZE rows
Post by: Fearless Freap on March 27, 2013, 03:06:17 PM
Nice tip... I will definitely look into that mod.  Thanks!