diff --git a/docs/chapter/database/postgresql.md b/docs/chapter/database/postgresql.md index 89a52b6..04ccac8 100644 --- a/docs/chapter/database/postgresql.md +++ b/docs/chapter/database/postgresql.md @@ -23,6 +23,10 @@ SELECT (DATE '2001-02-16', DATE '2001-12-21') OVERLAPS -- 手动释放空间 VACUUM FULL VERBOSE ANALYZE; +-- 查看可用扩展 +SELECT * FROM pg_available_extensions; +-- 高效字符串索引 +create index if not exists idx_table_on_column on 'table' using gin ('column' gin_trgm_ops) ``` 2. 类型转换 diff --git a/docs/chapter/devops/ffmpeg.md b/docs/chapter/devops/ffmpeg.md index 3257009..991b445 100644 --- a/docs/chapter/devops/ffmpeg.md +++ b/docs/chapter/devops/ffmpeg.md @@ -49,4 +49,12 @@ ffmpeg -i input.mp4 -c:v libx264 -c:a aac -crf 23 -preset medium output.mp4 ``` ffmpeg -re -i 'input.mp4' -vcodec libx264 -acodec aac -f flv rtmp://127.0.0.1:1938/live/test +``` + +## 硬件加速 +```bash +# 查看支持的加速模式 +ffmpeg -hwaccels +# 启用加速,nv显卡 +ffmpeg -hwaccel cuda ``` \ No newline at end of file