Indexed queries have been finalized.
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/99938685 Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/99938685 Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/99938685 Branch: refs/heads/prestonc/basex Commit: 99938685f4bba9cf698abce4008fdca695955971 Parents: 1704272 Author: Preston Carman <[email protected]> Authored: Wed Sep 23 12:06:44 2015 -0700 Committer: Preston Carman <[email protected]> Committed: Wed Sep 23 12:06:44 2015 -0700 ---------------------------------------------------------------------- .../other_systems/basex_index/q00.xq | 4 ++-- .../other_systems/basex_index/q01.xq | 4 ++-- .../other_systems/basex_index/q02.xq | 4 ++-- .../other_systems/basex_index/q03.xq | 4 ++-- .../other_systems/basex_index/q04.xq | 8 ++++---- .../other_systems/basex_index/q05.xq | 8 ++++---- .../other_systems/basex_index/q06.xq | 8 ++++---- .../other_systems/basex_index/q07.xq | 8 ++++---- .../basex_index/sensors_database.bxs | 2 -- .../basex_index/sensors_database_add.bxs | 2 ++ .../basex_index/sensors_database_remove.bxs | 1 + .../basex_index/stations_database.bxs | 2 -- .../basex_index/stations_database_add.bxs | 2 ++ .../basex_index/stations_database_remove.bxs | 1 + .../other_systems/basex_scripts/.basex | 0 .../basex_scripts/run_basex_index_tests.sh | 18 +++++++++++++++++- 16 files changed, 47 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q00.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q00.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q00.xq index 21fc54a..1d52f26 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q00.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q00.xq @@ -22,8 +22,8 @@ See historical data for Key West International Airport, FL (USW00012836) station by selecting the weather readings for December 25 over the last 10 years. :) -let $collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r in collection($collection)/root/dataCollection/data +let $collection := "db_sensors" +for $r in db:open($collection)/root/dataCollection/data let $datetime := xs:dateTime(fn:data($r/date)) where $r/station eq "GHCND:USW00012836" and fn:year-from-dateTime($datetime) ge 2003 http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q01.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q01.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q01.xq index ba7f0f9..385689b 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q01.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q01.xq @@ -19,7 +19,7 @@ (: Find all reading for hurricane force wind warning or extreme wind warning. :) (: The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744 :) (: meters per second). (Wind value is in tenth of a meter per second) :) -let $collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r in fn:collection($collection)/root/dataCollection/data +let $collection := "db_sensors" +for $r in fn:db:open($collection)/root/dataCollection/data where $r/dataType eq "AWND" and xs:decimal($r/value) gt 491.744 return $r http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q02.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q02.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q02.xq index b089348..6a22a3a 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q02.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q02.xq @@ -22,8 +22,8 @@ Find the annual precipitation (PRCP) for a Syracuse, NY using the airport weather station (USW00014771) report for 1999. :) fn:sum( - let $collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" - for $r in collection($collection)/root/dataCollection/data + let $collection := "db_sensors" + for $r in db:open($collection)/root/dataCollection/data where $r/station eq "GHCND:USW00014771" and $r/dataType eq "PRCP" and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 1999 http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q03.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q03.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q03.xq index 285bf21..f37bf6e 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q03.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q03.xq @@ -18,8 +18,8 @@ (: XQuery Aggregate Query :) (: Find the highest recorded temperature (TMAX) in Celsius. :) fn:max( - let $collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" - for $r in collection($collection)/root/dataCollection/data + let $collection := "db_sensors" + for $r in db:open($collection)/root/dataCollection/data where $r/dataType eq "TMAX" return $r/value ) div 10 http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q04.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q04.xq index 9b69303..6d4fa48 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q04.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q04.xq @@ -18,11 +18,11 @@ (: XQuery Join Query :) (: Find all the weather readings for King county for a specific day :) (: 1976/7/4. :) -let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r in collection($sensor_collection)/root/dataCollection/data +let $sensor_collection := "db_sensors" +for $r in db:open($sensor_collection)/root/dataCollection/data -let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/" -for $s in collection($station_collection)/root/stationCollection/station +let $station_collection := "db_stations" +for $s in db:open($station_collection)/root/stationCollection/station where $s/id eq $r/station and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "WASHINGTON")) http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q05.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q05.xq index 68eed3a..737d6b4 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q05.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q05.xq @@ -19,11 +19,11 @@ (: Find the lowest recorded temperature (TMIN) in the state of Oregon for :) (: 2001. :) fn:min( - let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" - for $r in collection($sensor_collection)/root/dataCollection/data + let $sensor_collection := "db_sensors" + for $r in db:open($sensor_collection)/root/dataCollection/data - let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/" - for $s in collection($station_collection)/root/stationCollection/station + let $station_collection := "db_stations" + for $s in db:open($station_collection)/root/stationCollection/station where $s/id eq $r/station and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US")) http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q06.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q06.xq index 1e3061c..3971d4e 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q06.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q06.xq @@ -18,11 +18,11 @@ (: XQuery Join Query :) (: Find the highest recorded temperature (TMAX) for each station for each :) (: day over the year 2000. :) -let $sensor_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r in collection($sensor_collection)/root/dataCollection/data +let $sensor_collection := "db_sensors" +for $r in db:open($sensor_collection)/root/dataCollection/data -let $station_collection := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/" -for $s in collection($station_collection)/root/stationCollection/station +let $station_collection := "db_stations" +for $s in db:open($station_collection)/root/stationCollection/station where $s/id eq $r/station and $r/dataType eq "TMAX" http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q07.xq ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q07.xq index 23d4358..4f6f53a 100644 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q07.xq +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/q07.xq @@ -18,11 +18,11 @@ (: XQuery Join Aggregate Query :) (: Self join with all sensor readings after the year 2000. :) fn:avg( -let $sensor_collection_min := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r_min in collection($sensor_collection_min)/root/dataCollection/data +let $sensor_collection_min := "db_sensors" +for $r_min in db:open($sensor_collection_min)/root/dataCollection/data -let $sensor_collection_max := "../../../../../../../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/" -for $r_max in collection($sensor_collection_max)/root/dataCollection/data +let $sensor_collection_max := "db_sensors" +for $r_max in db:open($sensor_collection_max)/root/dataCollection/data where $r_min/station eq $r_max/station and $r_min/date eq $r_max/date http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database.bxs deleted file mode 100644 index 0d2f897..0000000 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database.bxs +++ /dev/null @@ -1,2 +0,0 @@ -CREATE DB db_sesnors -ADD ../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/sensors/ http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_add.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_add.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_add.bxs new file mode 100644 index 0000000..b56f86a --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_add.bxs @@ -0,0 +1,2 @@ +CREATE DB db_sensors +ADD /tmp/1.0_partition_ghcnd_all_xml/ http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_remove.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_remove.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_remove.bxs new file mode 100644 index 0000000..f923fd4 --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/sensors_database_remove.bxs @@ -0,0 +1 @@ +DROP DB db_sensors http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database.bxs deleted file mode 100644 index 8523aa2..0000000 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database.bxs +++ /dev/null @@ -1,2 +0,0 @@ -CREATE DB db_sesnors -ADD ../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/ http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_add.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_add.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_add.bxs new file mode 100644 index 0000000..cb1ea21 --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_add.bxs @@ -0,0 +1,2 @@ +CREATE DB db_stations +ADD ../weather_data/dataset-tiny-local/data_links/local_speed_up/d0_p1_i0/stations/ http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_remove.bxs ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_remove.bxs b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_remove.bxs new file mode 100644 index 0000000..1ebf918 --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_index/stations_database_remove.bxs @@ -0,0 +1 @@ +DROP DB db_stations \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/.basex new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/vxquery/blob/99938685/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/run_basex_index_tests.sh ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/run_basex_index_tests.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/run_basex_index_tests.sh index 9b35237..63f0533 100755 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/run_basex_index_tests.sh +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/other_systems/basex_scripts/run_basex_index_tests.sh @@ -25,7 +25,14 @@ EMAIL=${5} mkdir -p ~/logs/basex_index/ -time JAVA_OPTS="-Xmx8g" java -cp BaseX823.jar org.basex.BaseX +# Add BaseX databases +for j in $(find ${1} -name '*add.bxs') +do + date + echo "Setup BaseX database: ${j}" + time JAVA_OPTS="-Xmx8g" java -cp BaseX823.jar org.basex.BaseX -V -x -w -r${REPEAT} ${j} >> ~/logs/basex_index/$(basename "${j}").log 2>&1 +done + for j in $(find ${1} -name '*q??.xq') do @@ -35,6 +42,15 @@ do done +# Remove BaseX databases +for j in $(find ${1} -name '*remove.bxs') +do + date + echo "Setup BaseX database: ${j}" + time JAVA_OPTS="-Xmx8g" java -cp BaseX823.jar org.basex.BaseX -V -x -w -r${REPEAT} ${j} >> ~/logs/basex_index/$(basename "${j}").log 2>&1 +done + + if which programname >/dev/null; then echo "Sending out e-mail notification."
