aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/datastore/perf_plugin_datastore.c2
-rw-r--r--src/datastore/selectrandom.sql9
2 files changed, 10 insertions, 1 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index c5ef9841d..7a8a0d4cf 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -37,7 +37,7 @@
37 * those take too long to run them in the usual "make check" 37 * those take too long to run them in the usual "make check"
38 * sequence. Hence the value used for shipping is tiny. 38 * sequence. Hence the value used for shipping is tiny.
39 */ 39 */
40#define MAX_SIZE 1024LL * 1024 * 32 40#define MAX_SIZE 1024LL * 1024 * 16
41 41
42#define ITERATIONS 2 42#define ITERATIONS 2
43 43
diff --git a/src/datastore/selectrandom.sql b/src/datastore/selectrandom.sql
new file mode 100644
index 000000000..82830a13a
--- /dev/null
+++ b/src/datastore/selectrandom.sql
@@ -0,0 +1,9 @@
1select *
2from (select random() as v from (values(1))) t1,
3 (select max(repl) as m from data) t2,
4 (select * from data
5 where repl=t2.m and
6 rnd>=t.v
7 order by rnd
8 limit 1)
9