Post text in wiki
From Another Web Company
MISC notes for now... note to self - look into multi-table UPDATES, 'page' and 'searchindex'
The "Add post text to Wiki's dBase" is a resource hungry option.
The main idea behind adding this option is so that your thread posts can be searchiable via wikis search engine.
This option functions similar to how wiki adds new pages to its database, so alone its not that big of a deal but combined with the forum adding its own info to the forums-database-tables it become a little more intensive.
Below are some quick notes which give a brief break down on what goes on.
Two ways to do this:
- Inserting one 'text' and then keep updating the main threads 'text' and 'searchindex' entries.
- Inserting a new 'text' for every post and then keep updating the main threads 'text' and 'searchindex' entries.
As of now, when forum info is added to the wiki dbase it is entered under its own Namespace, 121707
Using the first way now..
Heres how the information passes around the database
Contents |
Adding Thread
Forum
- insert->'awc_f_threads'
- (If announcement) insert->'awc_f_anns'
- insert->'awc_f_posts'
- Multi-table UPDATE - 'awc_f_forums' with new threads info, 'awc_f_threads' with post (text) id
- UPDATE - members thread count
- (if enabled) UPDATE forum stats
- SELECT from 'awc_f_watchforums' for members subscribing to forum sections
7 / 8 queries (normally 6 being announcements are not that common)
Adding info to Wiki tables
- insert->'page'
- insert->'txt'
- insert->'rev'
- update 'page' page_latest, with rev
- update wiki states (using wiki-call, 2 queries, one SELECT then UPDATE)
- update thread with wiki-pageID
7 queries
17 / 18 total queries.
Adding Post
Forum
- insert->'awc_f_posts'
- Multi-table UPDATE - 'awc_f_forums' with new threads info, 'awc_f_threads' with new post info
- SELECT from 'awc_f_watchthreads' for members subscribing to the thread
- UPDATE - members thread count
- (if enabled) UPDATE forum stats
5 queries
Adding info to Wiki tables
- multi-table SELECT
- UPDATE 'page' with new time and len
- UPDATE 'text'
- UPDATE 'searchindex'
- update wiki states (using wiki-call, 2 queries, one SELECT then UPDATE)
6 queries
11 total queries.
Editing Post
Forum
- multi-table SELECT (get current posts info to add to the 'awc_f_post_edits' table)
- UPDATE 'awc_f_posts'
- (if main thread post) UPDATE 'awc_f_threads' - title
- INSERT 'awc_f_post_edits'
3 / 4 queries
Adding info to Wiki tables
Forum
Adding info to Wiki tables
- multi-table SELECT
- UPDATE 'page' with new len
- UPDATE 'text'
- UPDATE 'searchindex'
- update wiki states (using wiki-call, 2 queries, one SELECT then UPDATE)
6 queries in all
9 / 10 total queries.
Deleting Post
Forum
Adding info to Wiki tables
- delete 'page'
- delete 'searchindex'
- delete 'revision'
- update wiki states (using wiki-call, 2 queries, one SELECT then UPDATE)
5 queries in all
Additional Queries
As far as i can see, wiki alone does 6 queries with-in a "Special" page.
- - SELECT user
- - SELECT users group
- - SELECT messages
- - SELECT message revisions
- - SELECT user page - check for updates
- - SELECT user talk page - check for updates
Now to add to all of that, if you have the "Whoe's Here" option enabled, that requires 3 queries.
- Delete all entries before "this" date/time (to get a current session list)
- SELECT and get current list
- UPDATE the current members time and place (or add them)
And to add more on top of that, if you have the Forum Stats enabled, thats one query to get the info and a second if some kind of UPDATE is needed, new thread, new posts, "max number of members online at one time"
Conclusion
So with all that info you the "Add post text to Wiki's dBase" at your own risk.
-
| Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |