Subject | Re: fts attempt/can this be improved? |
---|---|
Author | markd_mms |
Post date | 2008-09-23T23:53:55Z |
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
<svein.erling.tysvaer@...> wrote:
this is a new table, although there's nothing inherently wrong in
doing so). However, I am a bit puzzled why you use
at the time so their a few things I do that I'm not sure about, but
performance has been ok so I've been loathe to change anything.
MEDIUM is tiny (28 records at the moment) and I don't have any plans
on adding much to it.
clause).
natural joins) but the query takes about 2 minutes to run and has
~700k reads on fts$score so I might just clean up the original SQL.
Thanks very much
<svein.erling.tysvaer@...> wrote:
>strange that you use the reserved word POSITION as a field name if
> Unless MEDIUM is a huge table, this seems OK to me (though I find it
this is a new table, although there's nothing inherently wrong in
doing so). However, I am a bit puzzled why you use
>It was started a while ago and I wasn't in the habit of writing notes
> WHERE (S1.WORDID = (SELECT WORDID FROM FTS$WORD WHERE WORD = 'SINGIN')
> AND S1.FIELD_NAME = 'TRACK') AND ...
at the time so their a few things I do that I'm not sure about, but
performance has been ok so I've been loathe to change anything.
MEDIUM is tiny (28 records at the moment) and I don't have any plans
on adding much to it.
> I also notice that you redundantly check PRODUCTID in the WHEREclause (you've already said that it has to be the same in your JOIN
clause).
>I think the plan for that is better (which is to say there are no
> and would myself first have tried this sql:
natural joins) but the query takes about 2 minutes to run and has
~700k reads on fts$score so I might just clean up the original SQL.
Thanks very much