vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello all Didn't know where to submit question regarding design&performance. Here's the situation. Basically process will take one message at a time,send it and the will send another one,each process knows which message to take from the table based on provider value. First situation: table layout: id bigint user int provider int Begin transaction,take one message from the table,send it,if all went well,then commit.The drawback of this situation is that transaction can last much longer depending how much time it will take to send message and confirm it was sent based on protocol used. Second situation: table layout: id bigint user int provider int taken boolean sent boolean false boolean In this scenario the process will take one message from the table,and mark it as 'taken',meaning it is taken for processing.The process will try to send message,if it succeed,it will update column 'sent',otherwise it will update column 'false'. In this scenario ,we'd have two instead of one transaction but each of this transaction will last much less then in first scenario,hence we might be able to achieve greater TPS then in first case. Hope You got my point,maybe somebody already had the same/similar situation ? Sincerely Dragan Zubac ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| ||||
| >>> On Fri, Nov 23, 2007 at 5:31 AM, in message <4746BA2F.6030104@vlayko.tv>, Dragan Zubac <zubac@vlayko.tv> wrote: > > Didn't know where to submit question regarding design&performance. This page is the place to figure that out: http://www.postgresql.org/community/lists/ For the questions you have, you probably should post in pgsql-general. Possibly pgsql-performance. > Begin transaction,take one message from the table,send it,if all went > well,then commit. I'm not clear on what you mean by "take one message from the table". (Do you mean that you will select it and delete it?) I'd suggest a re-post in a more appropriate list with a little more detail of this type, to give people more to go on. I'm sorry I wasn't able to help more; not quite enough information there.... -Kevin ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |