Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java

Поиск
Список
Период
Сортировка
От Daniel Blanch Bataller
Тема Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
Дата
Msg-id 21F11FC1-33EB-4FDB-8B9C-0BB6198A96A2@hoplasoftware.com
обсуждение исходный текст
Ответ на jdbc high memory consumption for RAISE NOTICE output using function-call in Java  (Georg Brünsing <georg.bruensing@clickware.de>)
Ответы Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-jdbc
Hi Georg:

Could you elaborate a bit more why do you want to RAISE NOTICE 150000 times?

Regards

- Daniel.


El 8 dic 2015, a las 11:37, Georg Brünsing <georg.bruensing@clickware.de> escribió:

The function creates ~16MB output. The VM needs ~200MB over statement.executeQuery(...).

CREATE OR REPLACE FUNCTION Test_Grosse_Logdatei() returns INTEGER AS
$$
DECLARE
BEGIN
    FOR i IN 1..150000 LOOP
        RAISE notice '123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ';
    END LOOP;   
   
    RETURN 0;
END;
$$
language plpgsql;

How can we reduce this?

Georg Brünsing

postgresql-9.4-1206-jdbc4.jar + postgresql-9.1-902.jdbc4.jar
psql (PostgreSQL) 9.3.1
Java(TM) SE Runtime Environment (build 1.8.0_66-b18) + Java(TM) SE Runtime Environment (build 1.7.0_75-b13) + Java(TM) SE Runtime Environment (build pxa6460sr7-20091215_02(SR7))
JDK 6-8
Windows/Linux



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Georg Brünsing
Дата:
Сообщение: jdbc high memory consumption for RAISE NOTICE output using function-call in Java
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: jdbc high memory consumption for RAISE NOTICE output using function-call in Java