Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f92GlBn05122 for ; Tue, 2 Oct 2001 12:47:12 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 130037 for ; Tue, 02 Oct 2001 09:47:09 -0700 From: "Josh Berkus" Subject: Indexing behavior To: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Tue, 02 Oct 2001 09:47:09 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200110/23 X-Sequence-Number: 4978 Folks, Q: Are brand-new rows included in PostgreSQL indexed immediately? Detail: I have several "keyset holding" tables where lists of primary key ids are inserted for immediate retrieval by the user. After a few retrievals, these keysets are not used again. The purpose of this arrangement is to get around the fact that Postgres 7.1.2 does not have recordset-returning procedures/functions. Since these keyset tables contain only brand new and deleted rows, the only way that indexes on the keyset columns will be useful is if the new rows are added to indexes immediately by the PostgreSQL engine. Otherwise, such indexes are useless and may even slow down queries. Feedback? Answers? -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco