Plsql Function with error: No space left on device.
От | David M. Richter |
---|---|
Тема | Plsql Function with error: No space left on device. |
Дата | |
Msg-id | 3B36FB6E.1039F0D4@DKFZ-heidelberg.de обсуждение исходный текст |
Список | pgsql-sql |
HAllo! I have wrote a function. If I call this function the following output appears: psql:restructure.sql:139: ERROR: cannot extend image: No space left on device. Check free disk space. My Postgres version is 7.1.2 My Server has the following data: Main memory size: 510 Mbytes 1 GenuineIntel Pentium III (Coppermine) processor 1 vga+ graphics device 1 keyboard 1 parallel port: lp0: base 0x378, no irq, no dma, modes SPP,ECP,ECPEPP,ECPPS2 PCI bus devices: Host bridge: Intel 440BX - 82443BX Host (rev 3). PCI bridge: Intel 440BX - 82443BX AGP (rev 3). ISA bridge: Intel 82371AB PIIX4 ISA (rev 2). IDE interface: Intel 82371AB PIIX4 IDE (rev 1). USB Controller: Intel 82371AB PIIX4 USB (rev 1). Bridge: Intel 82371AB PIIX4 ACPI (rev 2). SCSI storage controller: Adaptec AIC-7890/1 (rev 0). PCI bridge: DEC DC21152 (rev 3). Ethernet controller: Intel 82557 (rev 8). Multimedia audio controller: Ensoniq ES1371 (rev 8). Multimedia video controller: Zoran ZR36057 (rev 2). VGA compatible controller: Matrox Matrox G200 AGP (rev 3). Display controller: Matrox Matrox G200 AGP (rev 3). This is the function: CREATE FUNCTION series_image () RETURNS integer AS ' DECLARE psr_rec record; i integer := 0; BEGIN FOR psr_rec IN SELECT * FROM relseries_image000 LOOP UPDATE image SET seriesoid = psr_rec.parentoid WHERE chilioid = psr_rec.childoid; i := i + 1; END LOOP; IF NOT FOUND THEN RETURN -1; ELSE RETURN i; END IF; END; ' LANGUAGE 'plpgsql'; I saw during the execute of the function that the Ram was fully used and also the swap space was also fully used. How could I optimize the function above with new constructs of 7.1? the table relseries_image000 has ca. 3 Millions of rows. Every row has 3 columns. Thank you in advance for your help David
Вложения
В списке pgsql-sql по дате отправления: