Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Custom Thread Fields >> Custom Tables?
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #1
Custom Thread Fields >> Custom Tables?
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.
04-12-2011 05:07 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Custom Thread Fields >> Custom Tables?
I don't really understand what you mean, but probably no.

My Blog
04-12-2011 06:47 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: Custom Thread Fields >> Custom Tables?
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
Find all posts by this user Quote this message in a reply
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #4
RE: Custom Thread Fields >> Custom Tables?
(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?
(This post was last modified: 04-13-2011 11:33 AM by Firefox Wins.)
04-13-2011 11:29 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: Custom Thread Fields >> Custom Tables?
(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?

My Blog
(This post was last modified: 04-13-2011 12:08 PM by ZiNgA BuRgA.)
04-13-2011 12:07 PM
Find all posts by this user Quote this message in a reply
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #6
RE: Custom Thread Fields >> Custom 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?
04-13-2011 12:30 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: Custom Thread Fields >> Custom Tables?
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.

My Blog
04-13-2011 12:49 PM
Find all posts by this user Quote this message in a reply
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #8
RE: Custom Thread Fields >> Custom Tables?
OK, thanks for the answer.
(This post was last modified: 04-13-2011 01:26 PM by Firefox Wins.)
04-13-2011 01:26 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #9
RE: Custom Thread Fields >> Custom Tables?
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-14-2011 02:00 AM
Find all posts by this user Quote this message in a reply
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #10
RE: Custom Thread Fields >> Custom Tables?
(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.
04-14-2011 06:08 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: