|
5,692 min
85%
|
259,326 ms
|
1,317
postgres
|
SELECT config AS config
FROM upload
WHERE email IS NULL AND created_at < NOW() - INTERVAL $1
AND created_at > NOW() - INTERVAL $2
Covered by index on (created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text)))
Rows: 16659728
Row progression: 16659728, 1665973
Row estimates
- created_at (>): 1665973
- created_at (<): 1665973
- email (null): 3735111
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
143 min
2%
|
50 ms
|
171,352
postgres
|
SELECT COUNT(*) FROM "source_analysis" LEFT OUTER JOIN "files" "source_analysis__file" ON "source_analysis__file"."id"="source_analysis"."file_id" WHERE "source_analysis__file"."user_id"=$1 AND "source_analysis"."created_at">=$2
|
|
76 min
1%
|
4 ms
|
1,086,097
postgres
|
Update Upload set status= $1, audio_links= $2, statistics = $3, ended_at= $4::timestamp, config= $5, edits= $6, export_links= $7 where id = uuid($8)
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
73 min
1%
|
71 ms
|
61,719
postgres
|
SELECT "id" "id","created_at" "created_at","ended_at" "ended_at","status" "status","length_audio" "length_audio","task_id" "task_id","audio_links" "audio_links","config" "config" FROM "upload" WHERE "user_id"=$1 AND "created_at">=$2 ORDER BY "created_at" ASC
Details
CREATE INDEX CONCURRENTLY ON upload (user_id, created_at)
Rows: 16659728
Row progression: 16659728, 1102, 110
Row estimates
- user_id (=): 1102
- created_at (>=): 1665973
- created_at (sort): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
41 min
0.6%
|
0 ms
|
15,015,140
postgres
|
SELECT "length_audio" "length_audio","config" "config" FROM "upload" WHERE "task_id"=$1 LIMIT $2
Covered by index on (task_id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- task_id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
32 min
0.5%
|
1,182 ms
|
1,613
postgres
|
DELETE FROM "user" WHERE "id"=$1
Covered by index on (id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
22 min
0.3%
|
2 ms
|
536,138
postgres
|
SELECT "status" "status","config" "config" FROM "upload" WHERE "task_id"=$1 AND "user_id"=$2 LIMIT $3
Covered by index on (task_id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- task_id (=): 1
- user_id (=): 1102
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
11 min
0.2%
|
1 ms
|
1,092,377
postgres
|
INSERT INTO "upload" ("id","email","created_at","ended_at","statistics","edits","config","export_links","audio_links","timeline_links","audio_samples","length_audio","status","task_id","source","user_id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16)
|
|
10 min
0.2%
|
0 ms
|
85,856,051
postgres
|
SELECT pg_advisory_unlock_all()
|
|
5 min
< 0.1%
|
0 ms
|
4,482,004
postgres
|
SELECT $3 FROM "upload" WHERE "user_id"=$1 LIMIT $2
Covered by index on (user_id, created_at DESC)
Rows: 16659728
Row progression: 16659728, 1102
Row estimates
- user_id (=): 1102
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
4 min
< 0.1%
|
0 ms
|
618,415
postgres
|
INSERT INTO "files" ("id","created_at","filename_path","user_id") VALUES ($1,$2,$3,$4)
|
|
4 min
< 0.1%
|
0 ms
|
584,605
postgres
|
UPDATE "upload" SET "task_id"=$1,"config"=$2 WHERE "id"=$3
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
4 min
< 0.1%
|
6 ms
|
39,025
postgres
|
UPDATE "upload" SET "config"=$1 WHERE "id"=$2
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
3 min
< 0.1%
|
1 ms
|
188,555
postgres
|
UPDATE source_analysis
SET status = $1,
fast_facts = $2,
error = $3,
updated_at = CURRENT_TIMESTAMP
WHERE id = $4
AND analyzer_version = $5
AND status = $6
Covered by index on (id)
Rows: 185284
Row progression: 185284, 1
Row estimates
- id (=): 1
- status (=): 61761
- analyzer_version (=): 185284
Existing indexes
- id PRIMARY
- file_id, object_etag, object_size, analyzer_version UNIQUE
|
|
2 min
< 0.1%
|
25 ms
|
5,626
postgres
|
SELECT
stats.key AS key,
SUM((stats.value)::numeric) AS total
FROM upload u
CROSS JOIN LATERAL jsonb_each(COALESCE(u.config->$4, $5::jsonb)) AS stats(key, value)
WHERE u.user_id = $1
AND u.status = $6
AND u.created_at >= $2
AND u.created_at < $3
AND jsonb_typeof(stats.value) = $7
GROUP BY stats.key
|
|
2 min
< 0.1%
|
1 ms
|
194,509
postgres
|
UPDATE source_analysis
SET status = $1, error = $2, updated_at = CURRENT_TIMESTAMP
WHERE id = $3
AND analyzer_version = $4
AND status = $5
Covered by index on (id)
Rows: 185284
Row progression: 185284, 1
Row estimates
- id (=): 1
- status (=): 61761
- analyzer_version (=): 185284
Existing indexes
- id PRIMARY
- file_id, object_etag, object_size, analyzer_version UNIQUE
|
|
2 min
< 0.1%
|
20 ms
|
5,160
postgres
|
SELECT "id" "id","source" "source","config" "config","created_at" "created_at","length_audio" "length_audio" FROM "upload" WHERE "user_id"=$1 AND "status"=$2 AND "created_at">=$3 AND "created_at"<$4 ORDER BY "created_at" DESC LIMIT $5
Details
CREATE INDEX CONCURRENTLY ON upload (user_id, created_at)
Rows: 16659728
Row progression: 16659728, 1102, 110
Row estimates
- user_id (=): 1102
- created_at (>=): 1665973
- created_at (<): 1665973
- status (=): 4164932
- created_at (sort): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
1 min
< 0.1%
|
0 ms
|
469,311
postgres
|
SELECT COUNT(*) FROM "files" WHERE "filename_path"=$1
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
1 min
< 0.1%
|
0 ms
|
191,528
postgres
|
INSERT INTO "source_analysis" ("id","object_etag","object_size","object_last_modified","analyzer_version","status","fast_facts","error","deep_status","deep_facts","deep_error","created_at","updated_at","expires_at","file_id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)
|
|
1 min
< 0.1%
|
48 ms
|
1,032
postgres
|
SELECT "id","upload_type","user_id","description","name","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
1 min
< 0.1%
|
1 ms
|
44,484
postgres
|
UPDATE "upload" SET "user_id"=$1,"email"=$2 WHERE "id"=$3
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
1 min
< 0.1%
|
48 ms
|
1,022
postgres
|
SELECT "id","name","upload_type","settings","description","user_id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
1 min
< 0.1%
|
0 ms
|
306,542
postgres
|
UPDATE "user" SET "recurring_credit"=$1,"credit"=$2 WHERE "auth_id"=$3 AND "email"=$4
Covered by index on (auth_id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- auth_id (=): 1
- email (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
1 min
< 0.1%
|
5 ms
|
9,762
postgres
|
Update Upload set config= $1 where id = uuid($2)
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
1 min
< 0.1%
|
49 ms
|
899
postgres
|
SELECT "description","user_id","name","upload_type","id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
1 min
< 0.1%
|
0 ms
|
257,999
postgres
|
UPDATE "user" SET "meta"=$1 WHERE "id"=$2
Covered by index on (id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
1 min
< 0.1%
|
0 ms
|
456,004
postgres
|
UPDATE "user" SET "recurring_credit"=$1,"credit"=$2 WHERE "id"=$3
Covered by index on (id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
1 min
< 0.1%
|
48 ms
|
719
postgres
|
SELECT "upload_type","settings","user_id","id","description","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
1 min
< 0.1%
|
4 ms
|
9,762
postgres
|
Select config from Upload where id = uuid($1)
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
1 min
< 0.1%
|
48 ms
|
655
postgres
|
SELECT "upload_type","description","name","id","user_id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
1 min
< 0.1%
|
4 ms
|
7,965
postgres
|
SELECT "id" "id","paddle_email" "paddle_email","product_id" "product_id","paddle_order_id" "paddle_order_id","product_name" "product_name","created_at" "created_at" FROM "singlepayment" WHERE "user_id"=$1 ORDER BY "created_at" DESC
Details
CREATE INDEX CONCURRENTLY ON singlepayment (user_id)
Rows: 10941
Row progression: 10941, 1
Row estimates
- user_id (=): 1
- created_at (sort): 1
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
582
postgres
|
SELECT "id","description","upload_type","settings","user_id","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
0 ms
|
93,462
postgres
|
INSERT INTO "user" ("auth_id","email","recurring_credit","credit","created_at","meta") VALUES ($1,$2,$3,$4,$5,$6) RETURNING "id"
|
|
0 min
< 0.1%
|
49 ms
|
552
postgres
|
SELECT "upload_type","id","user_id","description","settings","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
544
postgres
|
SELECT "upload_type","description","settings","user_id","name","id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
50 ms
|
530
postgres
|
SELECT "name","upload_type","settings","id","user_id","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
526
postgres
|
SELECT "description","user_id","name","settings","id","upload_type" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
0 ms
|
1,517,624
postgres
|
SELECT $3 FROM "startup_program_application" WHERE "user_id"=$1 LIMIT $2
|
|
0 min
< 0.1%
|
4 ms
|
5,626
postgres
|
SELECT
date_trunc($4, u.created_at) AS bucket,
COUNT(*) AS total_uploads,
SUM(u.length_audio) AS total_credits,
SUM(CASE WHEN COALESCE(u.source, u.config->>$5, (u.config->$6->>$7), $8) = $9 THEN $10 ELSE $11 END) AS ui_uploads,
SUM(CASE WHEN COALESCE(u.source, u.config->>$12, (u.config->$13->>$14), $15) = $16 THEN u.length_audio ELSE $17 END) AS ui_credits,
SUM(CASE WHEN COALESCE(u.source, u.config->>$18, (u.config->$19->>$20), $21) = $22 THEN $23 ELSE $24 END) AS api_uploads,
SUM(CASE WHEN COALESCE(u.source, u.config->>$25, (u.config->$26->>$27), $28) = $29 THEN u.length_audio ELSE $30 END) AS api_credits
FROM upload u
WHERE u.user_id = $1
AND u.status = $31
AND u.created_at >= $2
AND u.created_at < $3
GROUP BY bucket
ORDER BY bucket ASC
|
|
0 min
< 0.1%
|
48 ms
|
471
postgres
|
SELECT "name","user_id","id","description","upload_type","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
470
postgres
|
SELECT "id","description","upload_type","name","user_id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
463
postgres
|
SELECT "upload_type","user_id","settings","name","id","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
460
postgres
|
SELECT "settings","id","user_id","upload_type","description","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
453
postgres
|
SELECT "user_id","name","upload_type","id","settings","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
47 ms
|
459
postgres
|
SELECT "name","settings","description","user_id","upload_type","id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
435
postgres
|
SELECT "name","description","upload_type","user_id","id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
438
postgres
|
SELECT "description","settings","upload_type","user_id","id","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
433
postgres
|
SELECT "upload_type","user_id","id","name","description","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
418
postgres
|
SELECT "id","upload_type","user_id","name","settings","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
47 ms
|
430
postgres
|
SELECT "settings","name","user_id","upload_type","id","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
406
postgres
|
SELECT "name","settings","user_id","id","upload_type","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
413
postgres
|
SELECT "upload_type","settings","description","id","name","user_id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
408
postgres
|
SELECT "description","id","name","settings","upload_type","user_id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
368
postgres
|
SELECT "id","upload_type","description","settings","user_id","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
361
postgres
|
SELECT "id","settings","upload_type","description","user_id","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
2 ms
|
7,965
postgres
|
SELECT "id" "id","paddle_subscription_id" "paddle_subscription_id","paddle_plan_id" "paddle_plan_id","paddle_status" "paddle_status","paddle_next_bill_date" "paddle_next_bill_date","paddle_cancelled_at" "paddle_cancelled_at","created_at" "created_at","paddle_user_id" "paddle_user_id" FROM "subscription" WHERE "user_id"=$1 ORDER BY "created_at" DESC
Details
CREATE INDEX CONCURRENTLY ON subscription (user_id)
Rows: 4692
Row progression: 4692, 1
Row estimates
- user_id (=): 1
- created_at (sort): 1
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
64 ms
|
264
postgres
|
SELECT "id" "id","source" "source","config" "config","created_at" "created_at","length_audio" "length_audio" FROM "upload" WHERE "user_id"=$1 AND "status"=$2 AND "created_at">=$3 AND "created_at"<$4 AND "created_at"<$5 ORDER BY "created_at" DESC LIMIT $6
Details
CREATE INDEX CONCURRENTLY ON upload (user_id, created_at)
Rows: 16659728
Row progression: 16659728, 1102, 110
Row estimates
- user_id (=): 1102
- created_at (>=): 1665973
- created_at (<): 1665973
- status (=): 4164932
- created_at (sort): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
3 ms
|
4,881
postgres
|
Select config, task_id from Upload where id = uuid($1)
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
0 ms
|
138,230
postgres
|
UPDATE "user" SET "auth_id"=$1,"email"=$2,"recurring_credit"=$3,"credit"=$4,"created_at"=$5,"meta"=$6 WHERE "id"=$7
Covered by index on (id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
0 min
< 0.1%
|
49 ms
|
311
postgres
|
SELECT "user_id","upload_type","name","description","id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
303
postgres
|
SELECT "id","settings","user_id","upload_type","name","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
48 ms
|
297
postgres
|
SELECT "id","description","name","upload_type","user_id","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
289
postgres
|
SELECT "settings","description","id","name","user_id","upload_type" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
49 ms
|
242
postgres
|
SELECT "user_id","name","settings","id","upload_type","description" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
2 ms
|
4,847
postgres
|
SELECT "key_id" "key_id","description" "description","created_at" "created_at","last_used_at" "last_used_at" FROM "key" WHERE "user_id"=$1 ORDER BY "created_at" DESC
Details
CREATE INDEX CONCURRENTLY ON key (user_id)
Rows: 4938
Row progression: 4938, 1
Row estimates
- user_id (=): 1
- created_at (sort): 1
Existing indexes
- id PRIMARY
- hashed_api_key UNIQUE
- key_id UNIQUE
|
|
0 min
< 0.1%
|
48 ms
|
183
postgres
|
SELECT "user_id","settings","upload_type","description","id","name" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
1 ms
|
11,387
postgres
|
Update "user" set credit= $1 where id = $2
Covered by index on (id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
0 min
< 0.1%
|
48 ms
|
133
postgres
|
SELECT "user_id","upload_type","name","id","description","settings" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
1 ms
|
8,766
postgres
|
SELECT
COUNT(*) FILTER (WHERE COALESCE(u.source, u.config->>$4, (u.config->$5->>$6), $7) = $8) AS api_calls,
SUM(CASE WHEN COALESCE(u.source, u.config->>$9, (u.config->$10->>$11), $12) = $13 AND u.status IN ($14, $15) THEN $16 ELSE $17 END) AS error_calls,
AVG(EXTRACT($18 FROM (u.ended_at - u.created_at))) FILTER (
WHERE COALESCE(u.source, u.config->>$19, (u.config->$20->>$21), $22) = $23
AND u.status = $24
AND u.ended_at IS NOT NULL
) AS avg_processing
FROM upload u
WHERE u.user_id = $1
AND u.created_at >= $2
AND u.created_at < $3
Details
CREATE INDEX CONCURRENTLY ON upload (user_id, created_at)
Rows: 16659728
Row progression: 16659728, 1102, 110
Row estimates
- user_id (=): 1102
- created_at (>=): 1665973
- created_at (<): 1665973
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
1 ms
|
4,640
postgres
|
INSERT INTO "configuration" ("name","description","settings","upload_type","user_id") VALUES ($1,$2,$3,$4,$5) RETURNING "id"
|
|
0 min
< 0.1%
|
1 ms
|
7,382
postgres
|
SELECT
COUNT(*) FILTER (WHERE COALESCE(u.source, u.config->>$4, (u.config->$5->>$6), $7) = $8) AS api_calls,
SUM(CASE WHEN COALESCE(u.source, u.config->>$9, (u.config->$10->>$11), $12) = $13 AND u.status = $14 THEN $15 ELSE $16 END) AS successes,
SUM(CASE WHEN COALESCE(u.source, u.config->>$17, (u.config->$18->>$19), $20) = $21 THEN u.length_audio ELSE $22 END) AS total_credits
FROM upload u
WHERE u.user_id = $1
AND u.created_at >= $2
AND u.created_at < $3
Details
CREATE INDEX CONCURRENTLY ON upload (user_id, created_at)
Rows: 16659728
Row progression: 16659728, 1102, 110
Row estimates
- user_id (=): 1102
- created_at (>=): 1665973
- created_at (<): 1665973
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
0 ms
|
14,439
postgres
|
Select user_id from Upload where id = $1
Covered by index on (id)
Rows: 16659728
Row progression: 16659728, 1
Row estimates
- id (=): 1
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
45 ms
|
86
postgres
|
SELECT "settings","description","id","upload_type","name","user_id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
0 ms
|
20,677
postgres
|
UPDATE "user" SET "recurring_credit"=$1 WHERE "auth_id"=$2 AND "email"=$3
Covered by index on (auth_id)
Rows: 1603383
Row progression: 1603383, 1
Row estimates
- auth_id (=): 1
- email (=): 1
Existing indexes
- id PRIMARY
- auth_id
- email
|
|
0 min
< 0.1%
|
2 ms
|
1,563
postgres
|
SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
FROM pg_type as t
LEFT JOIN pg_range as r ON oid = rngtypid
WHERE
t.typname IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40)
|
|
0 min
< 0.1%
|
0 ms
|
44,587
postgres
|
SELECT COUNT(*) FROM "upload" WHERE "user_id"=$1
Covered by index on (user_id, created_at DESC)
Rows: 16659728
Row progression: 16659728, 1102
Row estimates
- user_id (=): 1102
Existing indexes
- id PRIMARY
- created_at, id WHERE (config IS NOT NULL) AND ((config ? 'tracks'::text) OR (config ? 'global_merged_results'::text) OR (config ? 'global_transcription'::text))
- created_at DESC, source
- status, user_id
- task_id
- user_id, created_at DESC
|
|
0 min
< 0.1%
|
0 ms
|
17,296
postgres
|
SELECT "created_at","user_id","filename_path","id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
17,066
postgres
|
SELECT "created_at","id","user_id","filename_path" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
17,180
postgres
|
SELECT "user_id","filename_path","id","created_at" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
17,002
postgres
|
SELECT "filename_path","user_id","created_at","id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
17,021
postgres
|
SELECT "id","created_at","user_id","filename_path" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,847
postgres
|
SELECT "id","filename_path","user_id","created_at" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
2 ms
|
1,187
postgres
|
UPDATE "subscription" SET "paddle_next_bill_date"=$1,"paddle_status"=$2,"paddle_plan_id"=$3 WHERE "paddle_subscription_id"=$4
Details
CREATE INDEX CONCURRENTLY ON subscription (paddle_subscription_id)
Rows: 4692
Row progression: 4692, 1
Row estimates
- paddle_subscription_id (=): 1
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
0 ms
|
16,530
postgres
|
SELECT "user_id","created_at","id","filename_path" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,572
postgres
|
SELECT "filename_path","created_at","user_id","id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,529
postgres
|
SELECT "created_at","filename_path","id","user_id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,413
postgres
|
SELECT "created_at","user_id","id","filename_path" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,438
postgres
|
SELECT "created_at","filename_path","user_id","id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
0 ms
|
16,486
postgres
|
SELECT "id","created_at","filename_path","user_id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|
|
0 min
< 0.1%
|
46 ms
|
44
postgres
|
SELECT "upload_type","settings","name","user_id","description","id" FROM "configuration" WHERE "user_id"=$1
Details
CREATE INDEX CONCURRENTLY ON configuration (user_id)
Rows: 99783
Row progression: 99783, 2
Row estimates
- user_id (=): 2
Existing indexes
- id PRIMARY
|
|
0 min
< 0.1%
|
0 ms
|
16,452
postgres
|
SELECT "user_id","filename_path","created_at","id" FROM "files" WHERE "filename_path"=$1 LIMIT $2
Covered by index on (filename_path)
Rows: 8058223
Row progression: 8058223, 1
Row estimates
- filename_path (=): 1
Existing indexes
- id PRIMARY
- filename_path
|