> But I'm thinking that maybe it's a job for a database table.  Each
> new
> row would be written with a status (10="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.

create index <name> on <table>( <id> ) where status = 'new';

this index will be very fast.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to