 do language plpgsql $$                             
	 declare
	 begin
	   execute 'drop table if exists contend';
	     execute 'create table contend(id int, val int, c2 int default 0,c3 int default 0,c4 int default 0,c5 int default 0,c6 int default 0,c7 int default 0,c8 int default 0,c9
	       int default 0,c10 int default 0, crt_time timestamp default now())';
	         execute 'insert into contend(id,val) select generate_series(1,1000000),1 ';
		   
		  
		   for i in 1..10 loop
			       execute format('drop table if exists contend%s', i);
			           execute format('create table contend%s as select * from contend ', i);
				     end loop;
			     end;
			     $$;
