query1.sh:
=====
curl -w %{time_connect}:%{time_starttransfer}:%{time_total}   -X POST \
-H "content-type: application/json" \
-d @- \
http://localhost:8098/mapred \
<<EOF
{"inputs": {
                       "bucket": "timeline",
                       "index": "owner_bin",
                       "key": "6d87f18a3dca4a60b0fc385b1f46c165"
                   },
"query": [
 {"map": {"language": "javascript", "name": "Riak.mapValuesJson" }},
{"reduce": {"language": "javascript", "name": "Riak.filterNotFound" }},
{"reduce": {"language": "javascript", "name": "Riak.reduceSlice",
 "arg":[0,5] }},

            ]}
EOF
======
=> 0.005:1.468:1.468


query2.sh:
========
curl -w %{time_connect}:%{time_starttransfer}:%{time_total} -X POST \
-H "content-type: application/json" \
-d @- \
http://localhost:8098/mapred \
<<EOF
{"inputs": {
                       "bucket": "timeline",
                       "index": "owner_bin",
                       "key": "6d87f18a3dca4a60b0fc385b1f46c165"
                   },
"query": [
 {"map": {"language": "javascript", "name": "Riak.mapValuesJson" }},
 {"reduce": {"language": "javascript", "name": "Riak.reduceSort", "arg":
"function(a,b){ return a.event_timestamp-b.event_timestamp }" }},
{"reduce": {"language": "javascript", "name": "Riak.reduceSlice",
 "arg":[0,5] }},
            ]}
EOF
========
=>0.005:1.439:1.439



query3.sh:
========
curl -w %{time_connect}:%{time_starttransfer}:%{time_total} -X POST \
-H "content-type: application/json" \
-d @- \
http://localhost:8098/mapred \
<<EOF
{"inputs": {
                       "bucket": "timeline",
                       "index": "owner_bin",
                       "key": "6d87f18a3dca4a60b0fc385b1f46c165"
                   },
"query": [
 {"map": {"language": "javascript", "name": "Riak.mapValuesJson" }},
{"reduce": {"language": "javascript", "name": "Riak.reduceSlice",
 "arg":[0,5] }},
            ]}
EOF
========
=> 0.005:0.218:0.218

As for me, this is not so fast too. because currently it is very simple and
 if I add some logic or  users data is grow, all things will be much
slower.



Total number of keys in bucket: 3703
Keys matched with index: 299

Environment: cluster of 3 ec2 c3.xlarge instances(debian).
storage_backend : riak_kv_eleveldb_backend
erlydtl_version : <<"0.7.0">>
riak_control_version : <<"1.4.4-0-g9a74e57">>
cluster_info_version : <<"1.2.4">>
riak_search_version : <<"1.4.8-0-gbe6e4ed">>
merge_index_version : <<"1.3.2-0-gcb38ee7">>
riak_kv_version : <<"1.4.8-0-g7545390">>
sidejob_version : <<"0.2.0">>
riak_api_version : <<"1.4.4-0-g395e6fd">>
riak_pipe_version : <<"1.4.4-0-g7f390f3">>
riak_core_version : <<"1.4.4">>
bitcask_version : <<"1.6.6-0-g230b6d6">>
basho_stats_version : <<"1.0.3">>
webmachine_version : <<"1.10.4-0-gfcff795">>
mochiweb_version : <<"1.5.1p6">>
inets_version : <<"5.9">>
erlang_js_version : <<"1.2.2">>
runtime_tools_version : <<"1.8.8">>
os_mon_version : <<"2.2.9">>
riak_sysmon_version : <<"1.1.3">>
ssl_version : <<"5.0.1">>
public_key_version : <<"0.15">>
crypto_version : <<"2.1">>
sasl_version : <<"2.2.1">>
lager_version : <<"2.0.1">>
goldrush_version : <<"0.1.5">>
compiler_version : <<"4.8.1">>
syntax_tools_version : <<"1.6.8">>
stdlib_version : <<"1.18.1">>
kernel_version : <<"2.15.1">>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to