1 -- Copyright (C) 2011--2012,2014,2015 Kipp Cannon, Chad Hanna
3 -- This program is free software; you can redistribute it and/or modify it
4 -- under the terms of the GNU General Public License as published by the
5 -- Free Software Foundation; either version 2 of the License, or (at your
6 -- option) any later version.
8 -- This program is distributed in the hope that it will be useful, but
9 -- WITHOUT ANY WARRANTY; without even the implied warranty of
10 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11 -- Public License for more details.
13 -- You should have received a copy of the GNU General Public License along
14 -- with this program; if not, write to the Free Software Foundation, Inc.,
15 -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 -- process clean up. same computer, unix process ID, and start time =
22 CREATE INDEX tmpindex ON process (node, unix_procid, start_time);
23 CREATE TEMPORARY TABLE _idmap_ AS
25 old.process_id AS old,
26 MIN(new.process_id) AS new
29 JOIN process AS new ON (
31 AND new.unix_procid == old.unix_procid
32 AND new.start_time == old.start_time
37 CREATE INDEX tmpindex ON _idmap_ (old);
39 UPDATE sim_inspiral SET process_id = (SELECT new FROM _idmap_ WHERE old == process_id);
41 DELETE FROM process WHERE process_id IN (SELECT old FROM _idmap_ WHERE old != new);
42 DELETE FROM process_params WHERE process_id NOT IN (SELECT process_id FROM process);