Kjell Rilbe skriver:
> What new approach are you referring to?
> 2 X time for natural scan would be fair enough. It took 1½ hour to
> execute an update using execute block with for select .... do update....
> where the select picked PK:s from a temporary table I filled with a
> select like the above. It did 2522142 updates.
Oh, I forgot to mention that the insert that filled the temp table took
about 1½ hour to execute as well. So, 3 hours in total.
The insert query and plan:
insert into "Tmp" ("ECO_ID")
select LrgTbl."ECO_ID"
from "LargeTable" LrgTbl
inner join "Uppgiftshållare" UH on UH."ECO_ID" = LrgTbl."Hållare"
inner join "Uppgiftshanterare" Uhant on Uhant."ECO_ID" = UH."Hanterare"
where LrgTbl."ÄrNull" = 0
and UH."Propertynamn" in ('This', 'That', 'Other', 'Extra')
and Uhant."ColX" = 'Whatever'
PLAN JOIN (UHANT INDEX (IX_ColX), UH INDEX (IX_UH_Uhant), LRGTBL INDEX
(IX_LrgTbl_UH))
Kjell
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/