Re: some points for FAQ

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: some points for FAQ
Дата
Msg-id 200710092012.l99KCuq04702@momjian.us
обсуждение исходный текст
Ответ на some points for FAQ  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: some points for FAQ  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule wrote:
> 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.
> 

Well, give me a better example that works.

> 4.6)
> 
> ILIKE is slow, specially on multibyte encodings. If is possible use
> FULLTEXT. LIKE '%some%' is slow always .. thing about FULLTEXT.

I added a mention of "full text indexing" for word searches.

> 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");

Agreed.  I have updated the text to suggest RETURNING be used and
reduced the other examples.  The web site should have the updated
content shortly but CVS will have FAQ.html as well soon.

> 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.

Agreed.  Item removed.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: First steps with 8.3 and autovacuum launcher
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Timezone database changes