4.1) To SELECT a random row, use: SELECT col FROM tab ORDER BY random() LIMIT 1;
+ On bigger tables this solution is slow. Please, find smarter solution on network. 4.6) ILIKE is slow, specially on multibyte encodings. If is possible use FULLTEXT. LIKE '%some%' is slow always .. thing about FULLTEXT. 4.11.2) + 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"); 4.19) + 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. Regards Pavel Stehule p.s. can we create some general F.A.Q XML format and store FAQ there? WIP Proposal: <faq name = ..... language = > <entry number="1.1.1"> <query>....</query> <ansver> ... we need some tags from html: <p><br><a><i><b><ul><li><table> ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate