hardware : IBM x3650 Xeon E5420 2.5G 32G RAM RAID1 OS ,RAID 1 data
software : SUSE Linux Enterprise Server 11 (x86_64) Kernel 2.6.27.19
PostGreSQL 8.4.1
下表经常insert update 和 delete 结果某一天就出现下面的“杯具”。
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-01-30 10:59:59.997';
ERROR: tuple offset out of range: 0
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-01-30 09:59:59.997';
count
-------
11778
(1 row)
Time: 13.212 ms
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp > '2011-01-30 09:59:59.997' and d_gps_time_stamp < '2011-01-30 10:59:59.997';
count
-------
0
(1 row)
Time: 0.442 ms
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-01-30 10:59:59.997';
count
-------
11778
(1 row)
Time: 13.395 ms
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-02-18 23:59:59.997';
ERROR: tuple offset out of range: 0
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-02-11 23:59:59.997';
ERROR: tuple offset out of range: 0
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-02-01 23:59:59.997';
ERROR: tuple offset out of range: 0
^
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp > '2011-01-30 09:59:59.997' and d_gps_time_stamp < '2011-02-01 23:59:59.997';
count
-------
48259
(1 row)
Time: 222.314 ms
BMCV3=# SELECT count(*) from tblbmc_bat_activity_info WHERE d_gps_time_stamp < '2011-02-18 23:59:59.997';
count
---------
1322412
(1 row)
Time: 2543.782 ms
解决方法: 待续...
阅读(541) | 评论(0) | 转发(0) |