我在 Postgres 9.6 中有下表:
Table "public.TagNotifications"
Column | Type | Modifiers
--------------+-----------------------------+-----------------------------------------------------------------
createdAt | timestamp with time zone | not null default now()
updatedAt | timestamp with time zone | not null default now()
id | integer | not null default nextval('"TagNotifications_id_seq"'::regclass)
tag | character varying(255) | not null
triggerId | integer |
userId | integer | not null
comparison | "TagNotificationComparison" |
setpoint | double precision |
severity | "TagNotificationSeverity" |
acknowledged | boolean | not null default false …Run Code Online (Sandbox Code Playgroud) postgresql performance optimization order-by query-performance