Hi, I send some additional info :
pginfo wrote:sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids < 9742465 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=82281.59..82281.61 rows=10 width=148) (actual time=9373.301..9373.368 rows=10 loops=1)
-> HashAggregate (cost=82281.59..82594.48 rows=125156 width=148) (actual time=9373.294..9373.328 rows=10 loops=1)
-> Index Scan using a_gar_prod_r_pkey on a_gar_prod_r s (cost=0.00..69766.02 rows=1251557 width=148) (actual time=16.412..4175.948 rows=1237554 loops=1)
Index Cond: (ids < 9742465)
Total runtime: 9386.082 ms
(5 rows)
sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids < 9742466 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10;
ERROR: out of memory
DETAIL: Failed on request of size 344.
sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids >= 9742466 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=7747.82..7747.84 rows=10 width=148) (actual time=960.984..961.050 rows=10 loops=1)
-> HashAggregate (cost=7747.82..7777.27 rows=11783 width=148) (actual time=960.979..961.011 rows=10 loops=1)
-> Index Scan using a_gar_prod_r_pkey on a_gar_prod_r s (cost=0.00..6569.60 rows=117822 width=148) (actual time=0.874..431.357 rows=131824 loops=1)
Index Cond: (ids >= 9742466)
Total runtime: 961.283 ms
(5 rows)
regards, ivan.
Hi ,
I try to make insert into myTable select .... on pg 8.0.1 and freeBSD 5.3.
After ~10 sec. pg returns "out of memory".
In log file I found:
Portal hash: 8192 total in 1 blocks; 2008 free (0 chunks); 6184 used
Relcache by OID: 8192 total in 1 blocks; 4040 free (0 chunks); 4152 used
Relcache by name: 24576 total in 2 blocks; 13240 free (5 chunks); 11336 used
LockTable (locallock hash): 8192 total in 1 blocks; 4056 free (0 chunks); 4136 u
sed
ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used
ERROR: out of memory
DETAIL: Failed on request of size 340.
I have 2Gb RAM on this box.
regards, ivan.
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster