Marcin
2012-02-18 21:18:38 UTC
Hi,
My problem is probably common... I have a table with sms messages,
with statuses like New, Processing, Sent. There is one application
component that inserts messages and several instances of another
component that actually send those messages and update status to Send.
This is paralell processing.
My solution was to write a cursor (select * ... where status=new) that
reads new messages in packages by ten and changes status to
Processing. Each instance of sending component gets messages to send
using this cursor and then updates each message status after sending.
The question is: Am I forced to use cursor? The cursor performance is
terrible and I'd like to avoid using it.
m.
My problem is probably common... I have a table with sms messages,
with statuses like New, Processing, Sent. There is one application
component that inserts messages and several instances of another
component that actually send those messages and update status to Send.
This is paralell processing.
My solution was to write a cursor (select * ... where status=new) that
reads new messages in packages by ten and changes status to
Processing. Each instance of sending component gets messages to send
using this cursor and then updates each message status after sending.
The question is: Am I forced to use cursor? The cursor performance is
terrible and I'd like to avoid using it.
m.