From: | Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu> |
---|---|
To: | "Rodrigo Madera" <rodrigo(dot)madera(at)gmail(dot)com>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Best way to check for new data. |
Date: | 2005-10-28 22:13:18 |
Message-ID: | 01cb01c5dc0c$cce42830$8400a8c0@OTTO |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Rodrigo,
You could use LISTEN + NOTIFY with triggers.
In after_insert_statement trigger you could notify a listener, the client could query it immediately.
Best Regards,
Otto
----- Original Message -----
From: Rodrigo Madera
To: pgsql-performance(at)postgresql(dot)org
Sent: Friday, October 28, 2005 11:39 PM
Subject: [PERFORM] Best way to check for new data.
I have a table that holds entries as in a ficticious table Log(id integer, msg text).
Lets say then that I have the program log_tail that has as it´s sole purpose to print newly added data elements.
What is the best solution in terms of performace?
Thank you for your time,
Rodrigo
From | Date | Subject | |
---|---|---|---|
Next Message | Roger Hand | 2005-10-28 22:40:40 | Re: Simple query: how to optimize |
Previous Message | Collin Peters | 2005-10-28 21:53:32 | Simple query: how to optimize |