bonjour,
j'ai une table avec un shéma très simpe :
je souhaite exécuter cette requête :id serial NOT NULL,
wkf_id integer,
uid integer,
res_id integer,
res_type character varying(64),
state character varying(32) DEFAULT 'active'::character varying,
CONSTRAINT wkf_instance_pkey PRIMARY KEY (id),
CONSTRAINT wkf_instance_wkf_id_fkey FOREIGN KEY (wkf_id)
REFERENCES wkf (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE SET NULL
)
WITHOUT OIDS;
et elle prend plus de 5min voire plus car j'ai arrêté le process croyant que ça plante (cpu à 100%)delete from wkf_instance where res_type='cpn.account.hour'
il ya dans la table 700000 enregistrement à supprimer.
La table fait 56M, l'index 13M alors que le serveur est puissant et à 2go de mémoire.
où est le problème ?
si ça peut aider, voilà quelques infos durant le process :
Partager