Re: PLEASE GOD HELP US! - Mailing list pgsql-admin

From Tsirkin Evgeny
Subject Re: PLEASE GOD HELP US!
Date
Msg-id Pine.LNX.4.58.0410041657480.27241@p-roman.jct.ac.il
Whole thread Raw
In response to Re: PLEASE GOD HELP US!  (Tsirkin Evgeny <tsurkin@mail.jct.ac.il>)
List 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.

pgsql-admin by date:

Previous
From: Michael Long
Date:
Subject: Re: Users and multiple server environment
Next
From: Tomaž Borštnar
Date:
Subject: postgresql 8 in jail - LOG: could not create socket for statistics collector: Protocol not supported