X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B8B32D1D205 for ; Tue, 27 Jan 2004 14:06:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 74963-02 for ; Tue, 27 Jan 2004 10:06:22 -0400 (AST) Received: from OMEGA.denver.ibsncentral.com (mail.ibsncentral.com [69.44.125.178]) by svr1.postgresql.org (Postfix) with ESMTP id F305BD1D2E1 for ; Tue, 27 Jan 2004 10:06:17 -0400 (AST) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Subject: Re: Insert Times X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Tue, 27 Jan 2004 07:06:15 -0700 Message-ID: <82CEDAA6A559DB48A373FC3090F2560F356689@mail.ibsncentral.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PERFORM] Insert Times Thread-Index: AcPkqJHAmI0L48vYQMShoU08ppm1lQANh6Ku From: "PC Drew" To: "Leeuw van der, Tim" , X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/279 X-Sequence-Number: 5453 I tested this out and saw no improvement: EXPLAIN ANALYZE SELECT * FROM one; Seq Scan on one (cost=3D0.00..20.00 rows=3D1000 width=3D404) (actual time= =3D0.04..0.50 rows=3D51 loops=3D1) Total runtime: 0.75 msec EXPLAIN ANALYZE SELECT * FROM one; Seq Scan on one (cost=3D0.00..20.00 rows=3D1000 width=3D404) (actual time= =3D0.06..0.50 rows=3D51 loops=3D1) Total runtime: 0.64 msec EXPLAIN ANALYZE SELECT * FROM one; Seq Scan on one (cost=3D0.00..20.00 rows=3D1000 width=3D404) (actual time= =3D0.04..0.40 rows=3D51 loops=3D1) Total runtime: 0.54 msec EXPLAIN ANALYZE SELECT * FROM one; Seq Scan on one (cost=3D0.00..20.00 rows=3D1000 width=3D404) (actual time= =3D0.04..0.41 rows=3D51 loops=3D1) Total runtime: 0.54 msec EXPLAIN ANALYZE SELECT * FROM one; Seq Scan on one (cost=3D0.00..20.00 rows=3D1000 width=3D404) (actual time= =3D0.04..0.41 rows=3D51 loops=3D1) Total runtime: 0.53 msec EXPLAIN ANALYZE INSERT INTO one (id, msg) VALUES (1, 'blah'); Result (cost=3D0.00..0.01 rows=3D1 width=3D0) (actual time=3D0.01..0.02 ro= ws=3D1 loops=3D1) Total runtime: 0.85 msec EXPLAIN ANALYZE INSERT INTO one (id, msg) VALUES (1, 'blah'); Result (cost=3D0.00..0.01 rows=3D1 width=3D0) (actual time=3D0.02..0.02 ro= ws=3D1 loops=3D1) Total runtime: 0.15 msec EXPLAIN ANALYZE INSERT INTO one (id, msg) VALUES (1, 'blah'); Result (cost=3D0.00..0.01 rows=3D1 width=3D0) (actual time=3D0.02..0.02 ro= ws=3D1 loops=3D1) Total runtime: 0.14 msec EXPLAIN ANALYZE INSERT INTO one (id, msg) VALUES (1, 'blah'); Result (cost=3D0.00..0.01 rows=3D1 width=3D0) (actual time=3D0.02..0.02 ro= ws=3D1 loops=3D1) Total runtime: 0.12 msec EXPLAIN ANALYZE INSERT INTO one (id, msg) VALUES (1, 'blah'); Result (cost=3D0.00..0.01 rows=3D1 width=3D0) (actual time=3D0.01..0.02 ro= ws=3D1 loops=3D1) Total runtime: 0.12 msec -----Original Message----- From: Leeuw van der, Tim [mailto:tim.leeuwvander@nl.unisys.com] Sent: Tue 1/27/2004 12:38 AM To: PC Drew; pgsql-performance@postgresql.org Cc:=09 Subject: RE: [PERFORM] Insert Times Hi, My personal feeling on this is, that the long time taken for the first query is for loading all sorts of libraries, JVM startup overhead etc. What if you first do some SELECT (whatever), on a different table, to warm up the JVM and the database? regards, --Tim THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.=20