private String compute(String tableName, List<TableField> fields,
			List<StepSetOperation> operations, Connection memConn)
			throws Exception {
		long startTime = 0;
		// 栏目设置整理
		List<List<StepSetOperation>> lists = new ArrayList<List<StepSetOperation>>();
		// 共多少行
		int totalRowNum = 0;
		// 共多少页
		int totalPage = 0;
		// 字段
		Map<String, String> fieldsMap = new HashMap<String, String>();
		try {
			for (int i = 0; i < fields.size(); i++) {
				TableField field = fields.get(i);
				fieldsMap.put(field.getFieldName(), field.getFieldCaption());
			}
			String operateMode = "";
			List<StepSetOperation> list = null;
			for (int i = 0; i < operations.size(); i++) {
				StepSetOperation bean = operations.get(i);
				String opMode = bean.getOperateMode();
				if (!operateMode.equalsIgnoreCase(opMode)) {
					list = new ArrayList<StepSetOperation>();
					lists.add(list);
				}
				list.add(bean);
				operateMode = opMode;
			}
			Dialect dialect = Dialect.getInstance(memConn);
			String query = "SELECT * FROM " + tableName;
			totalRowNum = dialect.getMaxRowNum(query, memConn);
			totalPage = dialect.totalPage(totalRowNum, chunkSize);
			// 迭代执行
			for (int i = 0; i < lists.size(); i++) {
				List<StepSetOperation> listSSO = lists.get(i);
				StepSetOperation bean = listSSO.get(0);
				// 后续处理分片计算
				if ("行运算".equalsIgnoreCase(bean.getOperateMode())) {
					System.out.println("开始行运算");
					for (int j = 0; j < totalPage; j++) {
						startTime = System.currentTimeMillis();
						String sql = dialect.getLimitString(query, j
								* chunkSize, chunkSize);
						sql = "SELECT * FROM "+tableName+" WHERE id >= "+j*chunkSize+" ORDER BY id LIMIT "+chunkSize;
						int count = rowIteration(listSSO, fieldsMap, tableName,
								sql, memConn);
						System.out
								.println("运算行数："
										+ count
										+ " 消耗时间："
										+ (System.currentTimeMillis()
												- startTime + " 毫秒"));
					}
					System.out.println("行运算完成");
				}
				// 列运算不可以分片计算
				if ("列运算".equalsIgnoreCase(bean.getOperateMode())) {
					System.out.println("开始列运算");
					startTime = System.currentTimeMillis();
					colIteration(listSSO, fieldsMap, tableName, memConn);
					System.out.println("列运算完成! 消耗时间："
							+ (System.currentTimeMillis() - startTime + " 毫秒"));
				}
			}

		} catch (Exception e) {
			throw e;
		}
		return "栏目运算完成";
	}