storing custom filters in db

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

storing custom filters in db

Post by allspiritseve »

I'm looking at implementing ideas mentioned in this thread: viewtopic.php?f=19&t=94751&st=0&sk=t&sd=a

Basically I want a tag-based forum that allows users to select criteria that the system uses to automatically sort threads into user-defined categories. I'm wondering how to best store this in the database. For instance, lets say I want all threads tagged with tag 'data mapper' in which the original poster has more than 50 posts. I could easily write a query like this, but I need the system to be able to automatically parse threads based on the above criteria.

Considering the most common query would be to retrieve threads that meet a certain group of filters, I'm thinking of maybe having a table for the groups of categories, and attaching this group to a thread when it meets all criteria. That would allow for the quickest read times. However, what I'm most worried about is the time it takes to run all of the filters, since they're all user-defined. It seems like a aystem like this could drag a server down pretty quickly if not done right.

Any suggestions would be very much appreciated.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: storing custom filters in db

Post by onion2k »

Vanilla ( http://getvanilla.com/ ) works like that.
Post Reply