diff --git a/Changelog.md b/Changelog.md
index 530fe23..4a839d6 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -10,6 +10,10 @@ This is the changelog for the air quality web interface and its associated HTTP
  - `[Docs]` refers to changes to the [documentation](https://aq.connectedhumber.org/__nightdocs/00-Welcome.html).
 
 
+## v0.14
+ - [API] Optimise `list-reading-types` action, which necessitated a database schema update and the removal of the `count` property on returned objects
+
+
 ## v0.13.6
  - [Code] Add option to allow cross-origin-request sharing HTTP API requests
 
diff --git a/build b/build
index 5982237..7cd0eea 100755
--- a/build
+++ b/build
@@ -28,7 +28,7 @@ cache_dir="./.cache";
 build_output_folder="./app";
 
 # Database settings for ssh port forwarding task
-database_host="db.connectedhumber.org";
+database_host="ch-kimsufi";
 database_name="aq_db";
 database_user="www-data";
 
diff --git a/logic/Actions/ListReadingTypes.php b/logic/Actions/ListReadingTypes.php
index 83de6b3..7edd8af 100644
--- a/logic/Actions/ListReadingTypes.php
+++ b/logic/Actions/ListReadingTypes.php
@@ -37,7 +37,6 @@ class ListReadingTypes implements IAction {
 		
 		// 1: Parse & validate parameters
 		$device_id = !empty($_GET["device-id"]) ? intval($_GET["device-id"]) : null;
-		$days_to_analyse = intval($_GET["days"] ?? "1") - 1;
 		
 		$format = $_GET["format"] ?? "json";
 		if(!in_array($format, ["json", "csv"])) {
@@ -54,7 +53,7 @@ class ListReadingTypes implements IAction {
 		if(!is_int($device_id))
 			$data = $this->types_repo->get_all_types();
 		else
-			$data = $this->types_repo->get_types_by_device($device_id, $days_to_analyse);
+			$data = $this->types_repo->get_types_by_device($device_id);
 		$this->perfcounter->end("sql");
 		
 		// 1.5: Validate data from database
diff --git a/logic/Repositories/IMeasurementTypeRepository.php b/logic/Repositories/IMeasurementTypeRepository.php
index 232dbc3..83a37fb 100644
--- a/logic/Repositories/IMeasurementTypeRepository.php
+++ b/logic/Repositories/IMeasurementTypeRepository.php
@@ -33,8 +33,7 @@ interface IMeasurementTypeRepository {
 	/**
 	 * Gets the all the measurement types ever reported by a given device id.
 	 * @param	int			$device_id		The id of the device to get the reading types for.
-	 * @param	int			$day_to_analyse	The number of days worth fo data to analyse. Defaults to -1, which is everything. Set to 0 for readings recorded in the last 24 hours, which is much faster.
 	 * @return	string[]	A list of device ids.
 	 */
-	public function get_types_by_device(int $device_id, int $days_to_analyse = -1);
+	public function get_types_by_device(int $device_id);
 }
diff --git a/logic/Repositories/MariaDBDeviceRepository.php b/logic/Repositories/MariaDBDeviceRepository.php
index 12a0b45..28628a8 100644
--- a/logic/Repositories/MariaDBDeviceRepository.php
+++ b/logic/Repositories/MariaDBDeviceRepository.php
@@ -33,7 +33,6 @@ class MariaDBDeviceRepository implements IDeviceRepository {
 	public static $column_type_power = "power";
 	public static $column_type_software = "Software";
 	public static $column_type_notes = "Other";
-
 	
 	
 	// ------------------------------------------------------------------------
diff --git a/logic/Repositories/MariaDBMeasurementTypeRepository.php b/logic/Repositories/MariaDBMeasurementTypeRepository.php
index 7643f40..c96c9dd 100644
--- a/logic/Repositories/MariaDBMeasurementTypeRepository.php
+++ b/logic/Repositories/MariaDBMeasurementTypeRepository.php
@@ -81,27 +81,37 @@ class MariaDBMeasurementTypeRepository implements IMeasurementTypeRepository {
 		)->fetchAll();
 	}
 	
-	public function get_types_by_device($device_id, $days_to_analyse = -1) {
+	public function get_types_by_device($device_id) {
 		$data = [
 			"device_id" => $device_id
 		];
-		if($days_to_analyse >= 0)
-			$data["days"] = $days_to_analyse;
-		
 		$s = $this->get_static;
 		$o = $this->get_static_extra;
+		
+		$repo_device = MariaDBDeviceRepository::class;
+		$repo_sensor = MariaDBSensorRepository::class;
+		/*
+		SELECT reading_value_types.*
+		FROM devices
+		JOIN device_sensors ON device_sensors.device_id = devices.device_id
+		JOIN sensors ON sensors.id = device_sensors.sensors_id
+		JOIN sensor_reading_value_types ON sensor_reading_value_types.sensor_id = sensors.id
+		JOIN reading_value_types ON reading_value_types.id = sensor_reading_value_types.reading_value_types_id
+		WHERE devices.device_id=10
+		GROUP BY reading_value_types.id;
+		 */
 		return $this->database->query(
-			"SELECT
-				{$s("table_name")}.*,
-				COUNT({$s("table_name")}.{$s("column_id")}) AS count
-			FROM {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}
-			JOIN {$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")} ON
-				{$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")}.{$o(MariaDBMeasurementDataRepository::class, "column_metadata_id")} = {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}.{$o(MariaDBMeasurementDataRepository::class, "column_values_reading_id")}
-			JOIN {$s("table_name")} ON
-				{$s("table_name")}.{$s("column_id")} = {$o(MariaDBMeasurementDataRepository::class, "table_name_values")}.{$o(MariaDBMeasurementDataRepository::class, "column_values_reading_type")}
-			WHERE
-				{$o(MariaDBMeasurementDataRepository::class, "table_name_metadata")}.{$o(MariaDBMeasurementDataRepository::class, "column_metadata_device_id")} = :device_id
-				" . ($days_to_analyse >= 0 ? "AND DATEDIFF(NOW(),s_or_r) = :days" : "") . "
+			"SELECT {$s("table_name")}.*
+			FROM {$o($repo_device, "table_name")}
+			JOIN {$o($repo_sensor, "table_name_assoc")}
+				ON {$o($repo_sensor, "table_name_assoc")}.{$o($repo_sensor, "col_assoc_device_id")} = {$o($repo_device, "table_name")}.{$o($repo_device, "column_device_id")}
+			JOIN {$o($repo_sensor, "table_name")}
+				ON {$o($repo_sensor, "table_name_assoc")}.{$o($repo_sensor, "col_assoc_sensor_id")} = {$o($repo_sensor, "table_name")}.{$o($repo_sensor, "col_id")}
+			JOIN {$o($repo_sensor, "table_name_rtassoc")}
+				ON {$o($repo_sensor, "table_name")}.{$o($repo_sensor, "col_id")} = {$o($repo_sensor, "table_name_rtassoc")}.{$o($repo_sensor, "col_rtassoc_sensor_id")}
+			JOIN {$s("table_name")}
+				ON {$o($repo_sensor, "table_name_rtassoc")}.{$o($repo_sensor, "col_rtassoc_rvt_id")} = {$s("table_name")}.{$s("column_id")}
+			WHERE {$o($repo_device, "table_name")}.{$o($repo_device, "column_device_id")} = :device_id
 			GROUP BY {$s("table_name")}.{$s("column_id")};",
 			$data
 		)->fetchAll();
diff --git a/logic/Repositories/MariaDBSensorRepository.php b/logic/Repositories/MariaDBSensorRepository.php
index 8827d50..2f6f57a 100644
--- a/logic/Repositories/MariaDBSensorRepository.php
+++ b/logic/Repositories/MariaDBSensorRepository.php
@@ -19,6 +19,10 @@ class MariaDBSensorRepository implements ISensorRepository {
 	public static $col_assoc_device_id = "device_id";
 	public static $col_assoc_sensor_id = "sensors_id";
 	
+	public static $table_name_rtassoc = "sensor_reading_value_types";
+	public static $col_rtassoc_sensor_id = "sensor_id";
+	public static $col_rtassoc_rvt_id = "reading_value_types_id";
+	
 	
 	// ------------------------------------------------------------------------
 	
diff --git a/version b/version
index 71e8e4c..8dff8e8 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-v0.13.4-dev
+v0.14-dev
