Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Which is faster?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
muzishun Posted - 28 May 2006 : 17:32:08
I'm working on an application using Snitz, and I'm trying to figure out the best way to do part of it.

Users will be able to select from their profile which categories and forums are displayed to them on the main page. The same will go for evens (already added the calendar MOD). What I'm wondering is if it would be faster to:
(a) store the information in a Session variable or cookie, then loop through the list of cats and forums they want to display and verify that events fall under these, or
(b) hit the database with a large query with a bunch of "WHERE cat = x OR cat = y OR cat = z...." tacked on, or
(c) something I haven't thought of yet (if there's a simpler way to do this, I'm all ears)

Hope that's a little clearer than mud. Looking back through it I'm not sure I explained it well, but let me know if there's something I need to clarify more.<
5   L A T E S T    R E P L I E S    (Newest First)
Shaggy Posted - 31 May 2006 : 04:42:06
You're welcome, Bill

<
muzishun Posted - 30 May 2006 : 16:43:54
That's true. Looks like I'll end up going the route of nested query. Thanks for the help.<
Shaggy Posted - 29 May 2006 : 11:32:32
Ay, trouble with doing it with session varaibles is that they'd have to be repopulated every time the members started a new session, requiring an additional db hit each time.

<
muzishun Posted - 29 May 2006 : 11:03:37
Thanks. I'm using MySQL, so the queries should run fairly fast. I'm also looking into the possibility of this being on a dedicated server (in the future, if this grows like we're hoping it will), so that will help with some performance issues.

I had a feeling that might be the simplest way to do it, but wanted to double check it with people here, since I'm still relatively new in comparison.<
Shaggy Posted - 29 May 2006 : 05:23:08
I'd go with modifying the existing query to select the exact forums the user wants to see, something along the lines of:

SELECT [FIELDS] FROM [TABLES] WHERE [CONDITIONS] AND CAT_ID IN (SELECT CAT_ID FROM [YOUR_NEW_TABLE] WHERE MEMBER_ID="&MemberID&")

Depending on the database you're using, you may have to pull that nested query out and run it sperately.

<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000 Version 3.4.07