Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2F49E9FB585 for ; Mon, 23 Apr 2007 20:27:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08620-03 for ; Mon, 23 Apr 2007 20:27:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from weatherbeeta.com.au (218-214-212-153.people.net.au [218.214.212.153]) by postgresql.org (Postfix) with SMTP id 9DD9A9FB538 for ; Mon, 23 Apr 2007 20:27:23 -0300 (ADT) Received: (qmail 21993 invoked from network); 23 Apr 2007 23:27:21 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;be4cc0571e3c1dc69878fbc3de71fdee; Received: from mail.weatherbeeta.com.au (10.10.0.2) by network-box.weatherbeeta.com.au with SMTP; 23 Apr 2007 23:27:21 -0000 Received: (qmail 11657 invoked by uid 1166); 24 Apr 2007 09:27:16 +1000 Received: from 172.20.0.155 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.0.155):. Processed in 0.221684 secs); 23 Apr 2007 23:27:16 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.0.155):. Processed in 0.221684 secs Process 11651) Received: from it-phil.weatherbeeta.com.au (HELO wbaus090) (172.20.0.155) by mail.weatherbeeta.com.au with SMTP; 24 Apr 2007 09:27:15 +1000 From: "Phillip Smith" To: Subject: Large journal as psql table. Good idea? Triggering. Date: Tue, 24 Apr 2007 09:27:03 +1000 Organization: Weatherbeeta Pty Ptd Message-ID: <003e01c785fe$e6180630$9b0014ac@wbaus090> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Importance: Normal X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1177370841.26-21988-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.02/0.07 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.015 tagged_above=0 required=5 tests=AWL=-0.121, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200704/219 X-Sequence-Number: 28219 If it's going to be too big for a database, then it's going to be worse using flat-files on a disk :) I'd suggest putting it in a database, and have 2 tables: 1) "New" messages to be sent 2) Archive messages That way the polling machine only has to wait for the database to scan = the "New" table, then move them in to the Archive table once it has sent = them. Depending how many records you're actually looking at, one table with an index would probably be fine :) ~p -----Original Message----- From: pgsql-sql-owner@postgresql.org = [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Bryce Nesbitt Sent: Tuesday, 24 April 2007 09:12 I'm considering using a postgres table for something that could be done with a flat file. Is this a good idea? I have events on a machine "A", which need to be sent by an SMS/Cell Phone modem that's on a totally different machine "B". Potentially this is a job for a flat file FIFO. But I'm thinking that maybe it's a job for a database table. Each new row would be written with a status (10=3D"new"). And that the modem process would poll for new rows. Problem is there will be lots of rows, but only a trivial few will be "new". The huge index file and the polling seem like a drag on the database, unless there is a way to = optimize. *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments