Subject | Re: [firebird-support] Preformance without 'Temporary Tables' |
---|---|
Author | Arno Brinkman |
Post date | 2004-01-09T15:30:05Z |
Hi,
faster as executing 7 queries with hardcoded number.
If it happends again try deactivate/activate the index, this will rebuild
the index.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81
> > Could you show us your PLAN please.Well that's good.
>
> PLAN (A ORDER ACTION_TIC)
> PLAN (U NATURAL)
> > And in fact don't you want to do this then instead of running 6 queries:
> >Yes, but ACTIONS U will always visit every record, so this is porbably much
> > UPDATE
> > ACTIONS U
> > SET
> > U.SERVED = U.SERVED /
> > (SELECT Count(*) FROM ACTIONS A WHERE A.TICKET_REF = U.TICKET_REF)
>
> Only reason I did not run that at first was that 80000 of
> the 140000 records the count is 1, so I was just trying to
> remove unnecessary updates!
> I was simply surprised when my 'obvious' approach failed.
faster as executing 7 queries with hardcoded number.
> Now how on earth do I find out why it was not working forIt seems the index and data was heavily fragmented.
> the last 24 hours :)
If it happends again try deactivate/activate the index, this will rebuild
the index.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird links :
http://www.firebirdsql.com
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Nederlandse firebird nieuwsgroep :
news://80.126.130.81