0
SQLコマンドの中で一つだけのテーブルのために立ち往生。SQLコマンドは、私は<strong>postgresの</strong>データベースを使用Djangoプロジェクトで働いていますpostgresの</p> <p>に一つだけのテーブルのために立ち往生postgresの
SQLクエリのすべてのテーブルのために働いたがの作業common_designprofilecontent
テーブル
に取り組んでいない:
reader=# SELECT COUNT(*) FROM common_document;
count
-------
20046
(1 row)
はを動作していない:
reader=# SELECT COUNT(*) FROM common_designprofilecontent;
ない結果をこのクエリから、最小20046 * 4の行がこの表にあります。次行った後
:Djangoは大きなテーブルとトリッキーなことができ
reader=# select * from pg_stat_activity;
5:30 | 2016-03-21 10:22:27.240863+05:30 | 2016-03-21 10:22:28.614431+05:30 | t | SELECT "common_designprofilecontent"."id", "common_designprofil
econtent"."page_id", "common_designprofilecontent"."doc_id", "common_designprofilecontent"."profilename", "common_designprofilecontent"."profileconten
t", "common_designprofilecontent"."page_rev_no", "common_designprofilecontent"."createdDate", "common_designprofilecontent"."createdAgent_id", "common
_designprofilecontent"."modifiedDate", "common_designprofilecontent"."modifiedAgent_id" FROM "common_designprofilecontent" WHERE "common_designprofile
content"."doc_id" = 26952
16440 | reader | 28783 | 10 | postgres | vacuumdb | | | -1 | 2016-03-19 23:37:15.579589+0
5:30 | 2016-03-19 23:37:15.581737+05:30 | 2016-03-19 23:37:15.581737+05:30 | t | VACUUM (FULL, ANALYZE);
+
も何もログファイルに/var/log/pgsql
...あなたのための最も簡単かつ最速のオプションは、カウント
または
lenが高速である使用することだろうと思いますか?ハンギング?ただ空の結果ですか?何らかの理由でフル真空が走っていると、それが物を塞ぐ可能性があります。 –
postgresを再起動しても問題は再現できますか? – spicyramen
@SamKuhmonen:Hanging ..私は真空については知らない。 –