From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Bruce Momjian" <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | some points for FAQ |
Date: | 2007-10-09 12:28:24 |
Message-ID: | 162867790710090528l5bd6ae48gbf1b634feb10ab53@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2007-10-09 12:36:28 | Re: Timezone database changes |
Previous Message | Peter Eisentraut | 2007-10-09 12:25:45 | Re: Uninformative messages from pg_ctl |