MyBB Hacks

Full Version: Custom Thread Fields >> Custom Tables?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there currently any way to use XThreads to create a custom field with input/output to (for example) database table `mybb_example1` ?
or,
Any chance of future plans to add this?
Thank you.
I don't really understand what you mean, but probably no.
I tried to do that before (if I didn't misunderstand what Firefox Wins meant). But I failed Biggrin
(04-13-2011 07:06 AM)RateU Wrote: [ -> ]I tried to do that before (if I didn't misunderstand what Firefox Wins meant). But I failed Biggrin

No fail RateU, you...
"I have not failed. I've just found 10,000 ways that won't work." ~Thomas A. Edison
Maybe next time you will succeed.  Smile

(04-12-2011 06:47 PM)ZiNgA BuRgA Wrote: [ -> ]I don't really understand what you mean...

All the data currently goes into mybb_threadfields & mybb_threadfields_data. Sometimes it would be good to be able to configure using different tables.
Did I explain better (more clearly) this time?
(04-13-2011 11:29 AM)Firefox Wins Wrote: [ -> ]All the data currently goes into mybb_threadfields & mybb_threadfields_data. Sometimes it would be good to be able to configure using different tables.
Why would you want to do that?
How is it any better in different tables?
If you were using several of these...
# Events Forum
# Download System
# Article Gallery
# Link Directory
...on a large forum, wouldn't it sometimes be faster and 'better' to have separate tables for some of the data?
I'm not sure where you got that idea from.
The MyBB threads table isn't separated, heck the posts table isn't separated, and there'll always be a heck of a lot more posts than there ever will be threads and threadfields.
In short, number of posts >= number of threads >= number of threadfield data entries. (not all threads may have threadfield data associated with them)

If you're really keen on optimisation, I'd start with the posts table first, not the threadfields_data table.  The threadfields table only stores structural information.
Hardly an issue though, because everything is indexed appropriately.
But if you really are at the point where this additional load of accessing an index (very low additional load) is too much, you should look into MySQL table partitioning.
Separating this stuff into separate tables is simply madness from what I can tell.
OK, thanks for the answer.
This the reason why I tried to do that before:
(04-13-2011 12:49 PM)ZiNgA BuRgA Wrote: [ -> ]everything is indexed appropriately.

I really really don't know what magic has been done with this table Oops
When I try to create my own table, I never succeed to make it optimized like that table Biggrin
Yeah, I'm still noob Biggrin
(04-13-2011 12:30 PM)Firefox Wins Wrote: [ -> ]...
# Events Forum
# Download System
# Article Gallery
# Link Directory
...

(04-13-2011 12:49 PM)ZiNgA BuRgA Wrote: [ -> ]...Separating this stuff into separate tables is simply madness from what I can tell.

Perhaps we are not on the same page, since we are looking at this from completely different points of view.
If (for example) someone was asking a question about planning to code a custom CMS and they said "...the events are stored in `cms_events` table and downloads are stored in `cms_downloads` table."
^^^
Would you call that madness?  Tongue


...because everything is indexed appropriately.
I understand, and thanks again for making XThreads.
Pages: 1 2
Reference URL's