Kaynağa Gözat

Add `auction_type` and `member_metadata_avatar` indexes (#140)

* Add `auction_type` and `member_metadata_avatar` indexes

* Add owned_nft_auction index

* Adjust postgres conf
Leszek Wiesner 1 yıl önce
ebeveyn
işleme
90d7c5fde8
2 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 3 0
      db/migrations/2100000000000-Indexes.js
  2. 3 1
      db/postgres.conf

+ 3 - 0
db/migrations/2100000000000-Indexes.js

@@ -25,6 +25,9 @@ module.exports = class Indexes2000000000000 {
       `CREATE INDEX "events_previous_nft_owner_channel" ON "processor"."event" USING BTREE (("data"->'previousNftOwner'->>'channel'));`
     )
     await db.query(`CREATE INDEX "events_buyer" ON "processor"."event" USING BTREE (("data"->>'buyer'));`)
+    await db.query(`CREATE INDEX "auction_type" ON "processor"."auction" USING BTREE (("auction_type"->>'isTypeOf'));`)
+    await db.query(`CREATE INDEX "member_metadata_avatar" ON "member_metadata" USING BTREE (("avatar"->>'avatarObject'));`)
+    await db.query(`CREATE INDEX "owned_nft_auction" ON "processor"."owned_nft" USING BTREE (("transactional_status"->>'auction'));`)
   }
 
   async down(db) {

+ 3 - 1
db/postgres.conf

@@ -1,4 +1,6 @@
 listen_addresses = '*'
 log_statement = all
 autovacuum_analyze_scale_factor = 0.01
-shared_buffers=1GB
+shared_buffers=2GB
+jit=off
+random_page_cost=1.0