对于我的未来项目,我有一个ClickHouse数据库。这个数据库是由RabbitsMQ提供的一些微服务本身提供的。
数据如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Configurationactivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</RelativeLayout>
<Button
android:id="@+id/celtic_cross"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Celtic Cross"
android:textSize="24sp" />
<Button
android:id="@+id/future_love_spread"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Future Partner Spread"
android:textSize="24sp" />
因此对于数百个不同的nodekey,我每10分钟就有一个值。
我需要有另一个表,其中包含每小时的值的总和或平均值(取决于nodekey类型)...
我的第一个想法只是使用crontab ... 但是数据并没有以流体流动的形式出现,有时微服务会添加2-3个新值,或者有时会是数周的数据出现……而我很少需要大批插入多年的新数据... >
目前,我只有数百个nodekey,但是项目将不断增长。
所以,我认为使用crontab或遍历数据库更新数据不是一个好主意...
我还有其他选择吗?