We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3c07b55 + c2f483e commit 2130ef3Copy full SHA for 2130ef3
scripts/import_results_diff.sql
@@ -0,0 +1,32 @@
1
+-- to get the latest reults from mysql into
2
+-- the materialized or cached view, we need to refresh it
3
+
4
+refresh materialized view msql_results;
5
6
+-- insert missing results
7
+insert into public.results
8
+select
9
+ a.*
10
+from
11
+ msql_results a
12
+where
13
+ a."timestamp" > (select
14
+ b."timestamp"
15
+ from
16
+ results b
17
+ order by
18
+ b."timestamp" desc
19
+ limit
20
+ 1);
21
22
+--##################################################
23
+--18-146471-122005 1550058728756
24
+-- latest timestamp
25
26
+ to_timestamp(1550058728.756);
27
28
29
+--18-123094-124719 1468582484160
30
+-- first timestamp
31
32
+ to_timestamp(1468582484.160);
0 commit comments