delete from feeditem where state=0;
delete from paw_feeditems where state=0;
update paw_feeditems set state=0 where datum<sysdate-21 and (state=1 or state=-1);
delete from feedcategoryitemrel r where not exists (select '1' from feeditem i where r.itemid=i.id);
commit;
exit

