Re: [GENERAL] Need some advice on a difficult query

2009-12-16 Thread Mike Christensen
Thanks! The queries I wrote in my email were just an example, my actual implementation specifies all column names required and also uses full text search. I just didn't want to paste in that much cruft :) I'll do some tests with your technique below and see which works better.. Mike On Wed, De

Re: [GENERAL] Need some advice on a difficult query

2009-12-16 Thread Sam Mason
On Wed, Dec 16, 2009 at 12:47:36AM -0800, Mike Christensen wrote: > When the user searches for a new pasta dish, the UI would generate a query > something like this: > > SELECT * FROM Recipes where RecipeTitle ilike '%pasta%'; > > I only need the data from the recipes table since I display a summ

Re: [GENERAL] Need some advice on a difficult query

2009-12-16 Thread Timo Klecker
UserId = 123 limit 1); Should be quite fast with the right indexes. Timo Von: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] Im Auftrag von Mike Christensen Gesendet: Mittwoch, 16. Dezember 2009 09:48 An: pgsql-general@postgresql.org Betreff: [GENERAL]

Re: [GENERAL] Need some advice on a difficult query

2009-12-16 Thread Mike Christensen
..@postgresql.org] *Im Auftrag von *Mike Christensen > *Gesendet:* Mittwoch, 16. Dezember 2009 09:48 > *An:* pgsql-general@postgresql.org > *Betreff:* [GENERAL] Need some advice on a difficult query > > > > Hi all - I'd like some advice on how to write a rather complicated (for m

[GENERAL] Need some advice on a difficult query

2009-12-16 Thread Mike Christensen
Hi all - I'd like some advice on how to write a rather complicated (for me, anyway) query and if there's any nifty Postgres features I can take advantage of in this situation. Imagine a database, if you will, used to store recipes. I have a recipes table: RecipeId RecipeTitle RecipeRating And a