Re: PLEASE GOD HELP US!

From: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
To: Shane|SkinnyCorp <shanew(at)skinnycorp(dot)com>
Cc: PgSQL ADMIN <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PLEASE GOD HELP US!
Date: 2004-10-04 15:08:49
Message-ID: Pine.LNX.4.58.0410041657480.27241@p-roman.jct.ac.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

it sometimes happens that mysql is faster .obviosly you have a case
when you have to try force the query to use indexes .
here are some not nice and trivial solutions:

[1] add another column that marks the rows that are in the upper 25
now, set up trigger to update the field .that would be VERY fast
(probably much more faster then mySql or any design in any db).

[2] add a column that inserts a serial number of every row
,set a trigger to update it on insert now use the max() to find
the latest post and < max()-25 to find the others.

I can suggest more ,but you got the idea.
I understand that this complicates things and the design is less
simple/nice ,but it should speed it up.
Hope it helps.
sorry for english .
--
Evgeny.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tomaž Borštnar 2004-10-04 16:17:57 postgresql 8 in jail - LOG: could not create socket for statistics collector: Protocol not supported
Previous Message Michael Long 2004-10-04 13:17:30 Re: Users and multiple server environment