wordpress日志修订是所有速度慢的罪恶之源,每次在后台发布或修改文章的时候,数据库都会产生一个revision版本的记录,几百篇日志会有几千条日志修订的记录,如果更多文章的话,那一个网页打开可能就要花费好几秒的时间,那时你的访客早就不见踪影了.问题出现了,就要想办法解决,Q&A DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmet…
利用sql批量删除表,存储过程. 最近用godaddy的空间,由于系统里面的表多,一个个的删除很麻烦,就网上搜集了一下解决方法. 给大家分享一下: 1.批量删除存储过程 declare @procName varchar(500) declare cur cursor for select [name] from sys.objects where type = p open cur fetch next from cur into @procName while @@fetch_status…
批量删除: DELETE FROM MyTable WHERE ID IN (1,2); 批量插入: INSERT INTO MyTable(ID,NAME) VALUES(1,'123');INSERT INTO MyTable(ID,NAME) VALUES(2,'456');INSERT INTO MyTable(ID,NAME) VALUES(3,'789'); 第二种方法,使用UNION ALL来进行插入操作: INSERT INTO MyTable(ID,NAME)SELECT…
--批量删除用户表 --1.删除外键约束DECLARE c1 cursor for select 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; ' from sysobjects where xtype = 'F'open c1declare @c1 varchar(8000)fetch next from c1 into @c1while(@@fetch_status=0…