<commit_before>--vacuum full;
delete from groups where iduser = idgroup;
delete from doc where doctype='T';
select setval('seq_id_tdoc', 1000000000);
delete from dochisto where id>1000000000;
delete from docattr where docid not in (select id from doc);

delete from docperm where not exists (select 1 from docread where docid=id );

--delete from docperm where userid not in (select iduser from groups) and userid not in (select num from vgroup) and userid not in (select idgroup from groups);
-- cluster idx_perm on docperm;
delete from fld where dirid not in (select initid from doc2 where locked != -1) and qtype='S';
--delete from fld where childid not in (select id from doc) and qtype='S'; <commit_msg>Also cleanup the `docpermext' table in `cleanFullContext.sql' (refs #4211)<commit_after>--vacuum full;
delete from groups where iduser = idgroup;
delete from doc where doctype='T';
select setval('seq_id_tdoc', 1000000000);
delete from dochisto where id>1000000000;
delete from docattr where docid not in (select id from doc);

delete from docperm where not exists (select 1 from docread where docid=id );
delete from docpermext where not exists (select 1 from docread where docid=id);

--delete from docperm where userid not in (select iduser from groups) and userid not in (select num from vgroup) and userid not in (select idgroup from groups);
-- cluster idx_perm on docperm;
delete from fld where dirid not in (select initid from doc2 where locked != -1) and qtype='S';
--delete from fld where childid not in (select id from doc) and qtype='S'; 
{'fraction_non_alphanumeric': 0.07964033397559409, 'fraction_numerical': 0.03275529865125241, 'mean_word_length': 4.992307692307692, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1516690', 'n_tokens_mistral': 498, 'n_tokens_neox': 453, 'n_words': 228}