Ok got the Jan2014 package working now with the comments in #3419 as suggested. Thanks.
I omitted the LOCKED statement and now the count of rows per
value in the column “file” matches the amount of rows in the actual files that were loaded, so that seems to work. But it dows not solve the whole problem.
I still get the initial reported problem with querying only the rows of which the first two characters in the value of the field ‘source’
matches the string ’04’. When I select a count of rows it reports about 2.8M matching rows which it should. When selecting the actual rows
however I get a lot less.
sql>SELECT COUNT(*), file FROM source1 GROUP BY file;
+---------+-----------------------------------------------------------------------------+
| L1 | file |
+=========+=============================================================================+
| 540299 | /home/bkaptijn/DDDB/.tmpinputdir/9723_9999_20130301_20130331_Schade_516.ASC |
| 1655861 | /home/bkaptijn/DDDB/.tmpinputdir/9772_9999_20130501_20130531_Schade_516.ASC |
| 476629 | /home/bkaptijn/DDDB/.tmpinputdir/9787_9999_20130401_20130430_Schade_516.ASC |
| 886713 | /home/bkaptijn/DDDB/.tmpinputdir/9788_9999_20130601_20130630_Schade_516.ASC |
| 1404888 | /home/bkaptijn/DDDB/.tmpinputdir/9795_9999_20130701_20130731_Schade_516.ASC |
| 1509934 | /home/bkaptijn/DDDB/.tmpinputdir/9978_9999_20130801_20130831_Schade_516.ASC |
+---------+-----------------------------------------------------------------------------+
6 tuples (94.898ms)
sql>SELECT COUNT(*) FROM source1 WHERE SUBSTRING(source,1,2) = '04';
+---------+
| L1 |
+=========+
| 2842771 |
+---------+
1 tuple (901.377ms)
sql>SELECT * FROM source1 WHERE SUBSTRING(source,1,2) = '04' LIMIT 1 OFFSET 326371;
+-----------------------------------------------------------------------------+--------+----------------------------------------------+
| file | line | source
+=============================================================================+========+==============================================+
| /home/bkaptijn/DDDB/.tmpinputdir/9772_7084_20130501_20130531_Schade_516.ASC | 268991 | 0499999999999999999999999999999999999999999 |
+-----------------------------------------------------------------------------+--------+----------------------------------------------+
1 tuple (770.827ms)
sql>SELECT * FROM source1 WHERE SUBSTRING(source,1,2) = '04' LIMIT 1 OFFSET 326372;
+------+------+--------+
| file | line | source |
+======+======+========+
+------+------+--------+
0 tuples (892.431ms)
sql>CREATE TABLE test04 AS SELECT * FROM source1 WHERE SUBSTRING(source,1,2) = '04' WITH DATA;
operation successful (21.4s)
sql>SELECT COUNT(*) FROM test04;
+--------+
| L1 |
+========+
| 326372 |
+--------+
Note: I didn’t have this problem with the Feb2013-SP5 release. I never tested the Feb2013-SP6 release.
Regards Bas