public void StoreExDivideToDB(boolean clean) {
		log.info("start store ex-divide to db...");
		
		String sql;
		int stock_num = 0;
		//key:market+code, value:date->ExDivide
		for (String key : ex_divide_map.keySet().toArray(new String[0])) {
			
			String arrs[] = key.split(",");
			String market = arrs[0];
			String code = arrs[1];
			
			String table_name = STOCK_EXDIVIDE_TABLE_PRE + market;
			
			if (stock_ex_divide_market_map.get(market).booleanValue() != true) {
				sql = "create table if not exists " + table_name + 
						"(" +
						"`code` varchar(32) not null default '', " +
						"`day` DATE not null default '0000-00-00', " +
						"`give` double NOT NULL default '0', " +
						"`right` double NOT NULL default '0', " +
						"`right_price` double NOT NULL default '0', " +
						"`bonus` double NOT NULL default '0', " +
						"PRIMARY KEY (`code`, `day`)" +
						") ENGINE=InnoDB DEFAULT CHARSET=utf8";	
				
				log.info("	" + sql);
				dbInst.updateSQL(sql);
				stock_ex_divide_market_map.put(market, Boolean.TRUE);
			}
			
			stock_num++;
			log.info("	store " + stock_num + ":" + market + "-" + code);
			
			//清理历史数据
			if (clean) {
				sql = "delete from " + table_name + " where code = '" + code + "'";
				log.info("	" + sql);
				dbInst.updateSQL(sql);
			}
			
			TreeMap<String, ExDivide> ex_divide = new TreeMap<String, ExDivide>(ex_divide_map.get(key));
			//key:date, value:ExDivide
			sql = "insert into " + table_name + 
					"(`code`, `day`, `give`, `right`, `right_price`, `bonus`) values ";
			for (String day : ex_divide.keySet().toArray(new String[0])) {
				ExDivide ed = ex_divide.get(day);
				sql = sql + "('" + code + "', " + 
						"'" + day + "', " + 
						ed.give + "," + 
						ed.right + "," +
						ed.right_price + "," +
						ed.bonus + "), ";
			}
			
			sql = sql.substring(0, sql.length() - 2) + ";";
			dbInst.updateSQL(sql);
		}
	}