Limit the results of a COUNT

2007-12-30 Thread donr2020
Our search engine does a master query INNER JOINed to a series of COUNT (*) subqueries that return what the number of results would have been had the user chosen different "filters" (or no filter at all). As an example: SELECT Main.Col1, NoFilter.TotCount, Filter1.SubCount, etc. FROM ( SELECT Col

Performance problem with ~0.5 GB tabel

2007-12-30 Thread Markus Fischer
Hi, I'm using phorum [1] and made some custom queries against their database. My query looks like this: SELECT message_id, subject, datestamp, forum_id, thread FROM phorum_messages WHERE forum_id IN (1, 2, 3, 4) AND parent_id = 0 AND thread != 0 AND status = 2 AND closed = 0 ORDER BY

RE: Help with query, (question simplified as last mail was very complicated to understand :))

2007-12-30 Thread Martin Gainty
the simple answer is and b.name='name3' ?Bon ChanceMartin__Disclaimer and confidentiality noteEverything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not

Re: Help with query, (question simplified as last mail was very complicated to understand :))

2007-12-30 Thread Richard
Richard a écrit : Sorry about my last email which was long and not clear. This is what I want to do Join two tables on "code table1" = "code table3" where messageid = for example 28 table 1 contains : message from messageid --

bulk updates/inserts and triggers

2007-12-30 Thread C K
Hello, I am facing a problem related with triggers and bulk updates/inserts. I have two tables one is having 'transactions' and another is 'documents'. Each record in transactions table relates with a document by DocId. Foreign keys are created. I have activated triggers for transactions table for