問題タブ [postgresql-performance]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
entity-framework - Postgresql を使用した単純なクエリに対する Entity Framework のパフォーマンスの低下
私の新しいプロジェクトでは、Postgresql で .NET Entity Framework を使用したいと考えています。そこで、まず単純な SQL クエリで Entity Framework のパフォーマンスを比較しました。このために、サンプルのデスクトップ アプリケーションを開発し、両方のモードで実行しました。マルチスレッド環境で、Entity Framework と単純な SQL クエリを使用します。Entity Framework のパフォーマンスは、SQL 呼び出しのパフォーマンスよりも 50% 低いことがわかりました。どちらの場合も NPGSQL を使用しています。
パフォーマンスはアプリケーションにとって重要な成功要因であり、毎秒約 250 ~ 300 のリクエストを処理しています。
Entity Framework を使用する必要があるかどうかを提案してください。または、EF のパフォーマンスを向上させて単純な SQL 呼び出しをインライン化するためのヒントやコツはありますか。.NET Framework 4.5 を使用しています。
postgresql - Postgresql Update コマンドが遅すぎる
次のpostgresqlテーブルがあります:
次のコマンドでこのテーブルを更新します。
ご覧のとおり、各行の dataID を更新しています。この更新は追加として機能します。以前のデータに新しいデータを追加します。
これは遅すぎます。特に「dataID」列が大きくなる場合。
以下は、「説明」の結果です。
説明する ANALYZE:
およびバージョン:
何か提案はありますか?
ruby-on-rails - 既存データ用の Postgresql FTS ソリューション
Railsアプリでは、既存のデータのpostgresにftsを追加しようとしています。これが私がやったことです:
name_tsv 列の値はまだ空です。しかし、簡単なテストのために、私はこれを試しました:
これと比較してください:
そして前者は遅いです。
質問:
1. 遅いのはなぜですか?
2. 既存のデータの tsvector 列を設定するためのベスト プラクティスは何ですか?
私の質問は Rails アプリに関連していますが、一般的には postgresql fts に関するものであるため、postgres 固有のソリューションは引き続き歓迎されます。
performance - Postgres NOT IN パフォーマンス
このクエリを高速化する方法はありますか?
入力
出力
ここでは単純化されたバージョンでOKです。結合はボトルネックではありません
問題は、これらの ID を持たないエンティティを見つけることです
説明
postgresql - PostgreSQL large single transaction slower than multiple transaction
On Postgres, I recently saw a case where there was a huge amount of selects being handled in a single transaction. This was really slow, so the solution was to break the selects into multiple transactions, which dramatically improved the query time.
Has anyone come across such a case? It seems counter intuitive and I was wondering if there was a technical reason as to why multiple transactions are preferable?
My only theory is that it's easier for the DB to maintain ACID properties with multiple transactions as opposed to a single gargantuan transaction.