Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE OR REPLACE procedure reception_get_changes() LANGUAGE 'plpgsql' SECURITY DEFINER AS $BODY$ BEGIN --Cоздаем основную таблицу с данными create table test_part_prunning (id int, val text) on commit drop; --Наполняем insert into test_part_prunning select (array[1,2,3,4,5])[floor(random()*5+1)], md5(random()::text) from generate_series(1, 100000) as n; vacuum analyze test_part_prunning; END; $BODY$; perform reception_get_changes(); SELECT * FROM test_part_prunning x; perform reception_get_changes();

Stuck with a problem? Got Error? Ask AI support!

Copy Clear