public static void select(String table, Date from, Date to, Selection sec) {
		cache.init();
		List<String> partitionList = new ArrayList<>();
		boolean firstAdd = true, lastAdded = false;
		for (int i = 0; i < TABLE_PARTCOUNT.get(table); i++) {
			TablePart key = new TablePart(table, i);
			Date lessThan = cache.get(key);
			if (firstAdd && before(from, lessThan)) {
				partitionList.add(key.toString());
				firstAdd = false;
				if (before(to, lessThan)) {
					lastAdded = true;
				}
			}
			if (!lastAdded) {
				partitionList.add(key.toString());
				if (before(to, lessThan)) {
					lastAdded = true;
				}
			}
		}
		sec.select(partitionList);
	}