Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Arvind Singh
Oh no, it is average. I am sorry , i did not mention that Average was calculated PeakUsage+MinimumUsage/PeriodOfUsage it is not that 500 users are always per hour, in real game scenario there are peak times within a hour, so it means there can be 500 users making simultaneous move, and t

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 12:02 PM, Chris Angelico wrote: Is there an article somewhere about how best to do a plug-pull test? Or is it as simple as "fire up pgbench, kill the power, bring things back up, and see if anything isn't working"? That's what I'd do and what I've always done in the past, but oth

Re: [GENERAL] database corruption questions

2012-10-13 Thread Chris Angelico
On Sun, Oct 14, 2012 at 1:13 PM, Craig Ringer wrote: > * Never, ever, ever use cheap SSDs. Use good quality hard drives or (after > proper testing) high end SSDs. Read the SSD reviews periodically posted on > this mailing list if considering using SSDs. Make sure the SSD has a > supercapacitor or

Re: [GENERAL] citext question

2012-10-13 Thread Craig Ringer
On 10/14/2012 05:48 AM, Heine Ferreira wrote: Hi I have played around a bit with the citext extention. It looks like it is a lot like the text data type - allmost like a memo field. Is there any way to restrict the length of citext fields, like char and varchar fields? First, don't use "char(n

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? I forgot to mention, you should also read: http://www.postgresql.org/docs/current/static/wal-reliability.html -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 11:00 AM, John R Pierce wrote: On 10/13/12 7:13 PM, Craig Ringer wrote: * Use a good quality hardware RAID controller with a battery backup cache unit if you're using spinning disks in RAID. This is as much for performance as reliability; a BBU will make an immense difference to d

Re: [GENERAL] database corruption questions

2012-10-13 Thread John R Pierce
On 10/13/12 7:13 PM, Craig Ringer wrote: * Use a good quality hardware RAID controller with a battery backup cache unit if you're using spinning disks in RAID. This is as much for performance as reliability; a BBU will make an immense difference to database performance. a comment on this o

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? * Maintain rolling backups with proper ageing. For example, keep one a day for the last 7 days, then one a week for the last 4 weeks, then one a month for the rest of the year, the

Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Craig Ringer
On 10/13/2012 07:52 PM, Arvind Singh wrote: we are all aware of the popular trend of MMO games. where players face each other live. My area of concern, is storage of player moves and game results. Using Csharp and PostgreSql The game client is browser based ASP.NET and calls Csharp f

Re: [GENERAL] citext question

2012-10-13 Thread Vibhor Kumar
On Oct 13, 2012, at 6:34 PM, David Johnston wrote: >> >> Hi >> >> I have played around a bit with the citext >> extention. It looks like it is a lot like the >> text data type - allmost like a memo >> field. Is there any way to restrict the >> length of citext fields, like char and >> varchar

Re: [GENERAL] database corruption questions

2012-10-13 Thread John R Pierce
On 10/13/12 3:04 PM, Leif Biberg Kristensen wrote: Lørdag 13. oktober 2012 23.53.03 skrev Heine Ferreira : >Hi > >Are there any best practices for avoiding database >corruption? In my experience, database corruption always comes down to flaky disk drives. Keep your disks new and shiny eg. les

Re: [GENERAL] citext question

2012-10-13 Thread David Johnston
On Oct 13, 2012, at 17:48, Heine Ferreira wrote: > Hi > > I have played around a bit with the citext > extention. It looks like it is a lot like the > text data type - allmost like a memo > field. Is there any way to restrict the > length of citext fields, like char and > varchar fields? > > T

Re: [GENERAL] database corruption questions

2012-10-13 Thread Leif Biberg Kristensen
Lørdag 13. oktober 2012 23.53.03 skrev Heine Ferreira : > Hi > > Are there any best practices for avoiding database > corruption? In my experience, database corruption always comes down to flaky disk drives. Keep your disks new and shiny eg. less than 3 years, and go for some kind of redundanc

[GENERAL] database corruption questions

2012-10-13 Thread Heine Ferreira
Hi Are there any best practices for avoiding database corruption? I suppose the most obvious one is to have a ups if it's a desktop machine. How do you detect corruption in a Postgresql database and are there any ways to fix it besides restoring a backup? Thanks H.F.

[GENERAL] citext question

2012-10-13 Thread Heine Ferreira
Hi I have played around a bit with the citext extention. It looks like it is a lot like the text data type - allmost like a memo field. Is there any way to restrict the length of citext fields, like char and varchar fields? Thanks H.F.

Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Scott Marlowe
On Sat, Oct 13, 2012 at 5:52 AM, Arvind Singh wrote: > we are all aware of the popular trend of MMO games. where players face each > other live. > > My area of concern, is storage of player moves and game results. > Using Csharp and PostgreSql > The game client is browser based ASP.NET and calls C

Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Filip Rembiałkowski
On Sat, Oct 13, 2012 at 1:52 PM, Arvind Singh wrote: > > To understand my query, please consider the following scenario > we store game progress in a postgres table. > A tournament starts with four players and following activity > > Each player starts with 100hitpoints > player 1 makes a strike (

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Merlin Moncure
On Sat, Oct 13, 2012 at 3:22 AM, Jasen Betts wrote: > On 2012-10-11, Vineet Deodhar wrote: > >> To give an example, I have tables for storing master records (year master, >> security master, etc.) for which pkid TINYINT is just sufficient. >> These pkid's are used as fk constraints in tables for

[GENERAL] Improve MMO Game Performance

2012-10-13 Thread Arvind Singh
we are all aware of the popular trend of MMO games. where players face each other live. My area of concern, is storage of player moves and game results. Using Csharp and PostgreSql The game client is browser based ASP.NET and calls Csharp functions for all database related processing To und

Re: [GENERAL] stored procedure multiple call call question

2012-10-13 Thread Jasen Betts
On 2012-10-02, Chris McDonald wrote: > Hi, > > > If I had a single table targ to insert into I would do an > > INSERT INTO targ SELECT thiscol, thatcol, theothercol FROM FOO. > > The problem is that I have tables targ1, targ2, targn to insert things into > and a nice stored procedure myproc whi

Re: [GENERAL] non-integer constant in ORDER BY: why exactly, and documentation?

2012-10-13 Thread Jasen Betts
On 2012-10-11, David Johnston wrote: > This is a multipart message in MIME format. > > --=_NextPart_000_0400_01CDA7D1.CAF1CC60 > Content-Type: text/plain; > charset="us-ascii" > Content-Transfer-Encoding: 7bit > > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@pos

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Jasen Betts
On 2012-10-11, Vineet Deodhar wrote: > To give an example, I have tables for storing master records (year master, > security master, etc.) for which pkid TINYINT is just sufficient. > These pkid's are used as fk constraints in tables for storing business > transactions. > The no. of rows in busin

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Jasen Betts
On 2012-10-10, Vineet Deodhar wrote: > --f46d040714c5d7a08c04cbb08256 > Content-Type: text/plain; charset=UTF-8 > > Hi ! > At present, I am using MySQL as backend for my work. > Because of the licensing implications, I am considering to shift from MySQL > to pgsql. > Typically, my apps are multi-u