To SELECT a random row, use:
ORDER BY random()
+ On bigger tables this solution is slow. Please, find smarter
solution on network.
ILIKE is slow, specially on multibyte encodings. If is possible use
FULLTEXT. LIKE '%some%' is slow always .. thing about FULLTEXT.
+ Alternatively (on PostgreSQL 8.2.0 and all later releases) you could
RETURNING clause for retrieving used SERIAL value, e.g.,
new_id = execute("SELECT INSERT INTO person(name) VALUES('Blaise
Pascal') RETURNING id");
+ most of problems with invalid OIDs in cache are solved in PostgreSQL
8.3. Please remeber, so every replanning of SQL statements needs time.
Write your application, they can exist without cache invalidation.
I am sorry, I am not able create patch via my minimalistic english knowleage.
p.s. can we create some general F.A.Q XML format and store FAQ there?
<faq name = ..... language = >
we need some tags from html: <p><br><a><i><b><ul><li><table>