Comments (3)
Hi,
Can you provide the output of EXPLAIN ANALYZE
with such query?
from peertube.
This one went fast.
EXPLAIN ANALYZE INSERT INTO "userVideoHistory"
("currentTime","videoId","userId","createdAt","updatedAt") VALUES
(20,4331,1,'2024-05-12 17:03:28.649+00','2024-05-12 17:03:28.649+00')
ON CONFLICT ("userId","videoId")
DO UPDATE SET "videoId"=EXCLUDED."videoId","userId"=EXCLUDED."userId","currentTime"=EXCLUDED."currentTime","updatedAt"=EXCLUDED."updatedAt"
RETURNING "id","currentTime","videoId","userId","createdAt","updatedAt";
QUERY PLAN
-----------------------------------------------------------------------------------------------------------
Insert on "userVideoHistory" (cost=0.00..0.01 rows=1 width=32) (actual time=0.235..0.236 rows=1 loops=1)
Conflict Resolution: UPDATE
Conflict Arbiter Indexes: user_video_history_user_id_video_id
Tuples Inserted: 0
Conflicting Tuples: 1
-> Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.074..0.074 rows=1 loops=1)
Planning Time: 0.193 ms
Execution Time: 0.303 ms
(8 rows)
I tried with a newly created user to see the performance upon INSERT:
QUERY PLAN
-----------------------------------------------------------------------------------------------------------
Insert on "userVideoHistory" (cost=0.00..0.01 rows=1 width=32) (actual time=0.207..0.208 rows=1 loops=1)
Conflict Resolution: UPDATE
Conflict Arbiter Indexes: user_video_history_user_id_video_id
Tuples Inserted: 1
Conflicting Tuples: 0
-> Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.011..0.011 rows=1 loops=1)
Planning Time: 0.043 ms
Trigger for constraint userVideoHistory_videoId_fkey: time=0.246 calls=1
Trigger for constraint userVideoHistory_userId_fkey: time=0.531 calls=1
Execution Time: 1.031 ms
(10 rows)
We only have 12 occurrences of these slow statements during the last 13 days, so it's not a big issue though.
from peertube.
Then I'm closing this issue, but don't hesitate to comment if you have more data!
from peertube.
Related Issues (20)
- Transcript summary
- Make transcriptions searchable HOT 1
- 'wss://angeltales.angellive.ru/tracker/socket' failed: HOT 3
- IIS revers proxy issue. Auth error. Upload/Download unknown error. Trusted proxy issue. HOT 3
- Missing docker config option for object_storage.max_request_attempts
- Ability to block certain domains from being imported with url HOT 6
- Support Captions on Live Streams HOT 1
- Support copy codecs in peertube runner
- Better <title> for Account and Channel pages HOT 1
- Peertube client markup playlist enhancement
- Deleting failed/error runner jobs result most of the time by "error, runner not found" HOT 2
- Default "storage: original_video_files" directory triggers misconfiguration warning HOT 1
- Option to restart runner job or transcode particular resolution HOT 2
- Can't create database in firts intall (node v20.16.0) HOT 2
- An error occurred when the plugin was running HOT 9
- In the admin/videos, when deleting a single video file, it deletes master.m3u8 HOT 3
- Defederation system HOT 1
- 6.03 - 6.21 Upgade wont start HOT 2
- Use of Passkey auth method to access accounts
- Peertube website as Major search engine result with subtitle shows a browser error string! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peertube.