Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commited7f37b

Browse files
committed
Add to DROP todo.
1 parent3fbd4d4 commited7f37b

File tree

2 files changed

+139
-5
lines changed

2 files changed

+139
-5
lines changed

‎contrib/intarray/README

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
This is an implementation of RD-tree data structure using GiST interface
2+
of PostgreSQL. It has built-in lossy compression - must be declared
3+
in index creation - with (islossy). Current implementation has index support
4+
for one-dimensional array of int4's.
5+
All works was done by Teodor Sigaev (teodor@stack.net) and Oleg Bartunov
6+
(oleg@sai.msu.su).
7+
8+
INSTALLATION:
9+
10+
gmake
11+
gmake install
12+
-- load functions
13+
psql <database> < _int.sql
14+
15+
EXAMPLE USAGE:
16+
17+
create table message (mid int not null,sections int[]);
18+
create table message_section_map (mid int not null,sid int not null);
19+
20+
-- create indices
21+
CREATE unique index message_key on message ( mid );
22+
CREATE unique index message_section_map_key2 on message_section_map (sid, mid );
23+
CREATE INDEX message_rdtree_idx on message using gist ( sections ) with ( islossy );
24+
25+
-- select some messages with section in 1 OR 2 - OVERLAP operator
26+
select message.mid from message where message.sections && '{1,2}';
27+
28+
-- select messages contains in sections 1 AND 2 - CONTAINS operator
29+
select message.mid from message where message.sections @ '{1,2}';
30+
-- the same, CONTAINED operator
31+
select message.mid from message where '{1,2}' ~ message.sections;
32+
33+
TEST:
34+
35+
subdirectory test contains test suite.
36+
cd ./test
37+
1. createdb TEST
38+
2. psql TEST < ../_int.sql
39+
3. ./create_test.pl | psql TEST
40+
4. ./bench.pl - perl script to benchmark queries, supports OR, AND queries
41+
with/without RD-Tree. Run script without arguments to
42+
see availbale options.
43+
44+
a)test without RD-Tree (OR)
45+
./bench.pl -d TEST -s 1,2 -v
46+
b)test with RD-Tree
47+
./bench.pl -d TEST -s 1,2 -v -r
48+
49+
BENCHMARKS:
50+
51+
Size of table <message>: 200000
52+
Size of table <message_section_map>: 268538
53+
54+
Distribution of messages by sections:
55+
56+
section 0: 73899 messages
57+
section 1: 16298 messages
58+
section 50: 1241 messages
59+
section 99: 705 messages
60+
61+
old - without RD-Tree support,
62+
new - with RD-Tree
63+
64+
+----------+---------------+----------------+
65+
|Search set|OR, time in sec|AND, time in sec|
66+
| +-------+-------+--------+-------+
67+
| | old | new | old | new |
68+
+----------+-------+-------+--------+-------+
69+
| 1| 1.427| 0.215| -| -|
70+
+----------+-------+-------+--------+-------+
71+
| 99| 1.029| 0.018| -| -|
72+
+----------+-------+-------+--------+-------+
73+
| 1,2| 1.829| 0.334| 5.654| 0.042|
74+
+----------+-------+-------+--------+-------+
75+
| 1,2,50,60| 2.057| 0.359| 5.044| 0.007|
76+
+----------+-------+-------+--------+-------+

‎doc/TODO.detail/drop

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ From pgsql-hackers-owner+M3040@hub.org Thu Jun 8 00:31:01 2000
22
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
33
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id AAA13157
44
for <pgman@candle.pha.pa.us>; Thu, 8 Jun 2000 00:31:00 -0400 (EDT)
5-
Received: from hub.org (root@hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id AAA01089 for <pgman@candle.pha.pa.us>; Thu, 8 Jun 2000 00:17:19 -0400 (EDT)
5+
Received: from hub.org (root@hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id AAA01089 for <pgman@candle.pha.pa.us>; Thu, 8 Jun 2000 00:17:19 -0400 (EDT)
66
Received: from hub.org (majordom@localhost [127.0.0.1])
77
by hub.org (8.10.1/8.10.1) with SMTP id e5846ib99782;
88
Thu, 8 Jun 2000 00:06:44 -0400 (EDT)
@@ -280,7 +280,7 @@ From Inoue@tpf.co.jp Sat Jun 10 01:01:01 2000
280280
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
281281
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA10355
282282
for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 01:01:00 -0400 (EDT)
283-
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id AAA25467 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 00:41:32 -0400 (EDT)
283+
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id AAA25467 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 00:41:32 -0400 (EDT)
284284
Received: from mcadnote1 (ppm110.noc.fukui.nsk.ne.jp [210.161.188.29] (may be forged))
285285
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
286286
id NAA03125; Sat, 10 Jun 2000 13:40:40 +0900
@@ -411,7 +411,7 @@ From tgl@sss.pgh.pa.us Sat Jun 10 01:31:04 2000
411411
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
412412
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id BAA10922
413413
for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 01:31:03 -0400 (EDT)
414-
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id BAA27265 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 01:16:07 -0400 (EDT)
414+
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id BAA27265 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 01:16:07 -0400 (EDT)
415415
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
416416
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id BAA06206;
417417
Sat, 10 Jun 2000 01:14:37 -0400 (EDT)
@@ -457,7 +457,7 @@ From dhogaza@pacifier.com Sat Jun 10 09:30:59 2000
457457
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
458458
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id JAA25987
459459
for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 09:30:58 -0400 (EDT)
460-
Received: from smtp.pacifier.com (comet.pacifier.com [199.2.117.155]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id JAA18716 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 09:15:08 -0400 (EDT)
460+
Received: from smtp.pacifier.com (comet.pacifier.com [199.2.117.155]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id JAA18716 for <pgman@candle.pha.pa.us>; Sat, 10 Jun 2000 09:15:08 -0400 (EDT)
461461
Received: from desktop (dsl-dhogaza.pacifier.net [207.202.226.68])
462462
by smtp.pacifier.com (8.9.3/8.9.3pop) with SMTP id GAA15799;
463463
Sat, 10 Jun 2000 06:14:28 -0700 (PDT)
@@ -509,7 +509,7 @@ From tgl@sss.pgh.pa.us Sun Jun 11 12:31:03 2000
509509
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
510510
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id MAA05771
511511
for <pgman@candle.pha.pa.us>; Sun, 11 Jun 2000 12:31:01 -0400 (EDT)
512-
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id MAA19315 for <pgman@candle.pha.pa.us>; Sun, 11 Jun 2000 12:24:06 -0400 (EDT)
512+
Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id MAA19315 for <pgman@candle.pha.pa.us>; Sun, 11 Jun 2000 12:24:06 -0400 (EDT)
513513
Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1])
514514
by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id MAA09503;
515515
Sun, 11 Jun 2000 12:22:42 -0400 (EDT)
@@ -720,3 +720,61 @@ Regards.
720720
Hiroshi Inoue
721721
Inoue@tpf.co.jp
722722

723+
From pgsql-hackers-owner+M3050@postgresql.org Thu Jan 11 21:49:43 2001
724+
Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28])
725+
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id VAA20277
726+
for <pgman@candle.pha.pa.us>; Thu, 11 Jan 2001 21:49:42 -0500 (EST)
727+
Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28])
728+
by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f0C2lhp74989;
729+
Thu, 11 Jan 2001 21:47:43 -0500 (EST)
730+
(envelope-from pgsql-hackers-owner+M3050@postgresql.org)
731+
Received: from dynworks.com (adsl-63-206-168-198.dsl.sktn01.pacbell.net [63.206.168.198])
732+
by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0C2lNp74855
733+
for <pgsql-hackers@postgresql.org>; Thu, 11 Jan 2001 21:47:23 -0500 (EST)
734+
(envelope-from jdavis@dynworks.com)
735+
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
736+
by dynworks.com (Postfix) with ESMTP id CC44F31FAB
737+
for <pgsql-hackers@postgresql.org>; Thu, 11 Jan 2001 18:48:36 -0800 (PST)
738+
Date: Thu, 11 Jan 2001 18:48:36 PST
739+
From: Jeff Davis <jdavis@dynworks.com>
740+
To: pgsql-hackers@postgresql.org
741+
Subject: [HACKERS] alter table drop column
742+
Reply-To: jdavis@dynworks.com
743+
X-Mailer: Spruce 0.6.5 for X11 w/smtpio 0.7.9
744+
MIME-Version: 1.0
745+
Content-Type: text/plain; charset="iso-8859-1"
746+
Content-Transfer-Encoding: 8bit
747+
Message-Id: <20010112024836.CC44F31FAB@dynworks.com>
748+
Precedence: bulk
749+
Sender: pgsql-hackers-owner@postgresql.org
750+
Status: OR
751+
752+
753+
I read the transcript of the alter table drop column discussion (old
754+
discussion) at http://www.postgresql.org/docs/pgsql/doc/TODO.detail/drop,
755+
and I have something to add:
756+
757+
People mentioned such ideas as a hidden column and a really deleted column,
758+
and it occurred to me that perhaps "vacuum" would be a good option to use.
759+
When a delete was issued, the column would be hidden (by a negative/invalid
760+
logical column number, it appears was the consensus). Upon issuing a
761+
vacuum, it could perform a complete deletion. This method would allow users
762+
to know that the process may take a while (I think the agreed method for a
763+
complete delete was to "select into..." the right columns and leave out the
764+
deleted ones, then delete the old table).
765+
766+
Furthermore, I liked the idea of some kind of "undelete", as long as it was
767+
just hidden. This could apply to anything that is cleaned out with a vacuum
768+
(before it is cleaned out), although I am not sure how feasible this is,
769+
and it isn't particularly important to me.
770+
771+
Regards,
772+
Jeff
773+
774+
--
775+
Jeff Davis
776+
Dynamic Works
777+
jdavis@dynworks.com
778+
http://dynworks.com
779+
780+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp