Subject Memory settings
Author Kjell Rilbe

I've got a classic server on a 8 cpu Windows 64 bit server with 8 Gbyte RAM.

I'm currently doing an update on a table with 70 million records, with a
subquery searching with a similar record count. It's taking a long time,
as expected considering the record counts, but I'm wondering about
memory usage. It's hit the roof and is probably swapping like crazy.

firebird.conf has defaults on all settings except some paths
(DatabaseAccess, ExternalFileAccess, UdfAccess).

The database has page size 4096 or 8192 (not quite sure, it should be
8192 but we may have forgot to set it...).

There's only this one connection that's actually doing anything.

The query:
update "Items"
set "RemovingUpdate" = (
select "Update"
from "ItemRemovalEvents"
where "ItemRemovalsEvents"."Id" = "Items"."RemovingEvent"
where "RemovingEvent" is not null

The plan:
PLAN("ItemRemovalEvents" INDEX (IX_PK_ItemRemovalEvents))

I assume it's doing a natural scan on the target table and indexed
lookups on the subquery table. This is fine, isn't it? No reason to try
to get it to use a better plan?

Kjell Rilbe
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64