Re: [GENERAL] Best approach for query with optional constraints

2013-01-28 Thread Kevin Grittner
Jon Smark wrote: > Here's the problem: I want to retrieve a list of bugs (possibly) matching > certain constraints.  One possible constraint is a user ID: if given, only > those bugs reported by the user will be returned.  Another constraint is > a set of tags: only those bugs that contain *all*

[GENERAL] Best approach for query with optional constraints

2013-01-27 Thread Jon Smark
Hi, I have a problem with multiple solutions, and my question concerns which solution is preferred given whatever optimizations happen inside the query planner. In a bug tracking system, I have the tables "users", "bugs" and "tags". One bug may have one user (the reporter) but multiple tags.  Mor