X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0C5309DC98A for ; Wed, 11 Jan 2006 09:55:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81578-06 for ; Wed, 11 Jan 2006 09:55:03 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id C95449DC9BF for ; Wed, 11 Jan 2006 09:54:57 -0400 (AST) Received: from 90.156-228-195.hosting.adatpark.hu (unknown [195.228.156.90]) by svr4.postgresql.org (Postfix) with ESMTP id 719DB5AF045 for ; Wed, 11 Jan 2006 13:55:02 +0000 (GMT) Received: from dsl54008174.pool.t-online.hu ([84.0.129.116] helo=[10.0.0.2]) by chemaxon.hu with esmtpsa (Exim 4.44 #1 (Debian)) id 1EwgRG-0006Bz-Az TLS Cipher TLSv1:AES256-SHA:256 for ; Wed, 11 Jan 2006 14:54:58 +0100 Message-ID: <43C50E31.5040104@chemaxon.hu> Date: Wed, 11 Jan 2006 14:54:57 +0100 From: =?ISO-8859-1?Q?Kov=E1cs_P=E9ter?= User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Memory leak or client side caching? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: 741cb369799b2f0a1f6c4283046e91ef X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/49 X-Sequence-Number: 14500 Hi, Executing the following code results in an increase of 1GB in memory usage by the process. String sql = "SELECT cd_id,cd_fp1,cd_fp2,cd_fp3,cd_fp4,cd_fp5,cd_fp6,cd_fp7,cd_fp8,cd_fp9,cd_fp10,cd_fp11,cd_fp12,cd_fp13,cd_fp14,cd_fp15,cd_fp16,cd_smiles FROM editexample1"; PreparedStatement ps = conn.prepareStatement(sql); try { ResultSet rs = ps.executeQuery(); try { while (rs.next()) { int cdId = rs.getInt(1); for (int i = 0; i < 16; i++) { int fp = rs.getInt(i+2); } String cdSmiles = rs.getString(18); } } finally { rs.close(); } } finally { ps.close(); } The result set contains 1 250 000 rows. I am not sure if this is a memory leak or the driver just caches the result set on the client side. If this is the latter, is there a way to turn off client side caching? If the former, how should I proceed to find the problem? Thank you! Peter