Usenet Replayer



utf-8


Path:  news2.ip-mobilphone.net ! NNTPLoader.ip-mobilphone.net ! text.usenetserver.com ! out04b.usenetserver.com ! news.usenetserver.com ! in02.usenetserver.com ! news.usenetserver.com ! green.octanews.net ! news-out.octanews.net ! news.glorb.com ! news.hub.org ! postgresql.org ! pgsql-hackers-owner+m108689
From:  pavel.stehule@gmail.com ("Pavel Stehule")
Newsgroups:  pgsql.hackers
Subject:  some points for FAQ
Date:  Tue, 9 Oct 2007 14:28:24 +0200
Organization:  Hub.Org Networking Services
Lines:  53
Sender:  mailnull@news.hub.org
Message-ID:  <162867790710090528l5bd6ae48gbf1b634feb10ab53@mail.gmail.com>
NNTP-Posting-Host:  news.hub.org
Mime-Version:  1.0
Content-Type:  text/plain; charset=UTF-8
Content-Transfer-Encoding:  7bit
X-Trace:  news.hub.org 1191933311 73674 200.46.204.72 (9 Oct 2007 12:35:11 GMT)
X-Complaints-To:  usenet@news.hub.org
NNTP-Posting-Date:  Tue, 9 Oct 2007 12:35:11 +0000 (UTC)
Content-Disposition:  inline
X-Received:  from hub.org (hub.org [200.46.204.220]) by news.hub.org (8.14.1/8.14.1) with ESMTP id l99CZB6l073664 for <pgsql-hackers@news.hub.org>; Tue, 9 Oct 2007 09:35:11 -0300 (ADT) (envelope-from pgsql-hackers-owner+m108689@postgresql.org)
X-Received:  from localhost (unknown [200.46.204.183]) by hub.org (Postfix) with ESMTP id 8E6D0B46D73 for <pgsql-hackers@news.hub.org>; Tue, 9 Oct 2007 09:35:16 -0300 (ADT)
X-Received:  from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 68883-09 for <pgsql-hackers@news.hub.org>; Tue, 9 Oct 2007 09:35:15 -0300 (ADT)
X-Received:  from postgresql.org (postgresql.org [200.46.204.71]) by hub.org (Postfix) with ESMTP id 12BF7B46D4E for <pgsql-hackers@news.hub.org>; Tue, 9 Oct 2007 09:35:16 -0300 (ADT)
X-Received:  from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 836FC9FA2AB for <pgsql-hackers-postgresql.org@postgresql.org>; Tue, 9 Oct 2007 09:28:32 -0300 (ADT)
X-Received:  from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 38808-05 for <pgsql-hackers-postgresql.org@postgresql.org>; Tue, 9 Oct 2007 09:28:29 -0300 (ADT)
X-Greylist:  domain auto-whitelisted by SQLgrey-1.7.5
X-Received:  from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.225]) by postgresql.org (Postfix) with ESMTP id 564489F9EF0 for <pgsql-hackers@postgresql.org>; Tue, 9 Oct 2007 09:28:27 -0300 (ADT)
X-Received:  by wr-out-0506.google.com with SMTP id 68so867276wri for <pgsql-hackers@postgresql.org>; Tue, 09 Oct 2007 05:28:24 -0700 (PDT)
X-DKIM-Signature:  v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=sbre+Y+YRD9cppFlcNXe7QQcGyfDsFib022ZKZayRBc=; b=AG98ZtXVMC4w3ZbqBgj+RT79PlBCbzTiMYNkAe6nPuxI+qEs5AxrhNfTZj/+9xzFdWkWLtZx0WerUFrJfauiPV3PAulZDtm3wRkGfUAtcjZHvHUwgfXMWW+QZC4hXZUhFYfToFwKB8B20BMiAyhkwX0IQpzXyLDc76Im72A0I8I=
X-DomainKey-Signature:  a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=kLedPuB6NiXwVq3SN96lHUdoRDmhrOb8pnRRtMIIAZmaVfmX853g6Ehn4EFOQCwmnCq4uLcBaKOMeXGcnrLUWd8rxY1xYB6ghBWCbyLRDi4b6TDwJQdHdQ7FnM0q8uDZg/8TLuVMj6X7fm1iD4iYuBLmTPTPxLw2SAK4BsZ6Z58=
X-Received:  by 10.90.105.19 with SMTP id d19mr5486313agc.1191932904670; Tue, 09 Oct 2007 05:28:24 -0700 (PDT)
X-Received:  by 10.90.30.9 with HTTP; Tue, 9 Oct 2007 05:28:24 -0700 (PDT)
X-To:  "Bruce Momjian" <bruce@momjian.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
X-Virus-Scanned:  Maia Mailguard 1.0.1
X-Mailing-List:  pgsql-hackers
X-List-Archive:  <http://archives.postgresql.org/pgsql-hackers (Who's computer is this?) >
X-List-Help:  <mailto:majordomo@postgresql.org?body=help>
X-List-ID:  <pgsql-hackers.postgresql.org>
X-List-Owner:  <mailto:pgsql-hackers-owner@postgresql.org>
X-List-Post:  <mailto:pgsql-hackers@postgresql.org>
X-List-Subscribe:  <mailto:majordomo@postgresql.org?body=sub%20pgsql-hackers>
X-List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
X-Precedence:  bulk
X-Received-Date:  Tue, 09 Oct 2007 08:35:17 EDT (text.usenetserver.com)
Xref:  news2.ip-mobilphone.net pgsql.hackers:38588


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 (Who's computer is this?)




Where you can get the newsgroup pgsql.hackers