
CREATE TABLE "public"."cloud_resource_query_perf" ("id" uuid NOT NULL, "tenant_id" uuid NOT NULL, "account_id" uuid NOT NULL, "resource_id" uuid NOT NULL, "tags" jsonb NOT NULL DEFAULT '{}', "database_name" text NOT NULL, "db_username" text NOT NULL, "query_type" text NOT NULL, "query_exec_duration_milli" integer NOT NULL, "query_total_exec_duration_milli" integer NOT NULL, "bill_total_secs" integer NOT NULL, "bill_interval_from" timestamp NOT NULL, "bill_interval_to" timestamp NOT NULL, "created_at" timestamp NOT NULL, "bill" float8 NOT NULL DEFAULT 0.0, "rpu" float8 NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("tenant_id") REFERENCES "public"."tenant"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("account_id") REFERENCES "public"."cloud_accounts"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("resource_id") REFERENCES "public"."cloud_resourses"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
