Skip to content

Commit 8c73dfc

Browse files
committed
Optimize benchmark query and update benchmark's results.
1 parent a87174d commit 8c73dfc

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

contrib/intarray/README.intarray

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,21 @@ BENCHMARK:
144144
see availbale options.
145145

146146
a)test without RD-Tree (OR)
147-
./bench.pl -d TEST -s 1,2 -v
147+
./bench.pl -d TEST -c -s 1,2 -v
148148
b)test with RD-Tree
149-
./bench.pl -d TEST -s 1,2 -v -r
149+
./bench.pl -d TEST -c -s 1,2 -v -r
150150

151151
BENCHMARKS:
152152

153153
Size of table <message>: 200000
154-
Size of table <message_section_map>: 268538
154+
Size of table <message_section_map>: 269133
155155

156156
Distribution of messages by sections:
157157

158-
section 0: 73899 messages
159-
section 1: 16298 messages
160-
section 50: 1241 messages
161-
section 99: 705 messages
158+
section 0: 74377 messages
159+
section 1: 16284 messages
160+
section 50: 1229 messages
161+
section 99: 683 messages
162162

163163
old - without RD-Tree support,
164164
new - with RD-Tree
@@ -168,11 +168,11 @@ new - with RD-Tree
168168
| +-------+-------+--------+-------+
169169
| | old | new | old | new |
170170
+----------+-------+-------+--------+-------+
171-
| 1| 1.427| 0.215| -| -|
171+
| 1| 0.625| 0.101| -| -|
172172
+----------+-------+-------+--------+-------+
173-
| 99| 1.029| 0.018| -| -|
173+
| 99| 0.018| 0.017| -| -|
174174
+----------+-------+-------+--------+-------+
175-
| 1,2| 1.829| 0.334| 5.654| 0.042|
175+
| 1,2| 0.766| 0.133| 0.628| 0.045|
176176
+----------+-------+-------+--------+-------+
177-
| 1,2,50,60| 2.057| 0.359| 5.044| 0.007|
177+
| 1,2,50,65| 0.794| 0.141| 0.030| 0.006|
178178
+----------+-------+-------+--------+-------+

contrib/intarray/bench/bench.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
push @where, "message.sections @ '{$opt{s}}'";
4343
} else {
4444
foreach my $sid ( split(/[,\s]+/, $opt{s} )) {
45-
push @where, "EXISTS ( select message_section_map.mid from message_section_map where message.mid=message_section_map.mid and message_section_map.sid = $sid )";
45+
push @where, "message.mid = msp$sid.mid";
46+
push @where, "msp$sid.sid = $sid";
47+
$table{"message_section_map msp$sid"}=1;
4648
}
4749
}
4850
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy