JQ Blog

Rubyの継承とinclude、extendの使い方

Rubyはオブジェクト指向言語であるのだけれど、Javaや他の言語の継承と考え方、方法が違うので調べてみた

継承

普通にSubクラスに親クラスを継承したら親クラスのメソッドを使えるようになる

1
2
3
4
5
class MyName
  def my_name
    p "My name is Jo"
  end
end
1
2
class Introduction < MyName
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My name is Jo"

Subクラスが親クラスのメソッドをoverrideすると同じように親クラスのメソッドを使える

1
2
3
4
5
class Introduction < MyName
  def my_name
    super
  end
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My name is Jo"

Subクラスでoverrideした親クラスのメソッドにsuperを書かないと親クラスからの影響はされない

1
2
3
4
5
class Introduction < MyName
  def my_name
    p "My name is..."
  end
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My name is..."

だが、上のメソッドにsuperを入れたら

1
2
3
4
5
6
class Introduction < MyName
  def my_name
    p "My name is..."
    super
  end
end
1
2
3
4
5
> introduction = Introduction.new
> introduction.my_name

"My name is..."
"My name is Jo"

include

includeはクラスにモジュールを使うようにしてくれる
継承の場合と少し似ている
まず、普通にクラスにモジュールを継includeしたらモジュールのメソッドを使えるようになる

1
2
3
4
5
module MyAge
  def my_age
    p "My age is 30."
  end
end
1
2
3
class Introduction
  include MyAge
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My age is 30."

overrideしたクラスのメソッドにsuperをつけると同じようにモジュールのメソッドを使えるようになる

1
2
3
4
5
6
7
class Introduction
  include MyAge

  def my_age
    super
  end
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My age is 30."

superを書かない場合はモジュールに影響されない

1
2
3
4
5
6
7
class Introduction
  include MyAge

  def my_age
    p "My age is....."
  end
end
1
2
3
4
> introduction = Introduction.new
> introduction.my_name

"My age is....."

その上、superを書いたらクラスのメソッドの処理とモジュールのメソッドの処理が両方行われる

1
2
3
4
5
6
7
8
class Introduction
  include MyAge

  def my_age
    p "My age is....."
    super
  end
end
1
2
3
4
5
> introduction = Introduction.new
> introduction.my_name

"My age is....."
"My age is 30."

extend

extendの使い方はさっきの継承やincludeと少し違う

1
2
3
4
5
module MyHobby
  def my_hobby
    p "My hobby is read a book!"
  end
end
1
2
3
class Introduction
  extend MyHobby
end

モジュールをextendしてクラスをオブジェクト化してメソッドを実行しようとすると NoMethodErrorが出てくる

1
2
3
4
> introduction = Introduction.new
> introduction.my_hobby

NoMethodError: undefined method `my_hobby' for #<Introduction:0x007fd74c0cae38>

だが、次のようにしてみると通る

1
2
3
> Introduction.my_hobby

"My hobby is read a book!"

つまり、extendしたモジュールのメソッドはクラスメソッドのように使えるということ

1
2
3
4
5
6
7
8
class Introduction
  extend MyHobby

  def self.my_hobby
    p "My hobby is....."
    super
  end
end
1
2
3
4
> Introduction.my_hobby

"My hobby is....."
"My hobby is read a book!"

extendはクラスメソッドに影響する

参考

継承, mix-in, include, extend について覚え書き
superを使って継承/Include/Extendしたメソッドをオーバーライド
rubyのrequire/include/extend/継承/クラス拡張ミックスインまとめ

Rails5のActionCable

はじめに

Action Cableとは

RailsにWebSocketを組み込む機能で、クライアントサイドからサーバサイドまでフルスタックな機能が提供されるということ。

大きな流れ

ビューのEvent発生(ex: onclick) -> coffeescriptのfunction呼び出し -> channelのメソッド呼び出し -> 必要な処理をする(ex: モデルのcreate,update,deployなど)

チャットサンプルを作ってみる

簡単に説明をすると、Rooms_controllerを通してチャットルームを作り、Messageモデルを通してチャットルームの中のメッセージを管理する。 その中でチャットルームでリアルタイムの通信を行ってみる。

Roomsコントローラの作成

1
rails g controller rooms index show

Messageモデルの作成

1
2
$ rails g model message content:text
$ rails db:migrate

Viewの作成

Roomsコントローラを編集し、Messageの配列をインスタンス変数に設定する。

1
2
3
4
5
6
7
8
9
10
class RoomsController < ApplicationController
  def index
    @rooms = Room.all.order(:id)
  end

  def show
    @room = Room.find(params[:id])
    @messages = @room.messages.order(:id)
  end
end

app/views/messages/_message.html.slimを作成する。

1
2
3
.message class="message_#{message.id}"
  = "#{message.body}"
  i.fa.fa-times.remove-icon data-message-id="#{message.id}"

app/views/rooms/show.html.slimを編集して、Messageの一覧を表示できるようにする。 renderはどんな形でも構わないがここには簡単にメッセージのrenderだけでしてみる。

1
2
3
4
5
6
7
8
9
h1 Chat Room
#myRoom data-room-id="#{@room.id}"
  = render @messages

div style="text-align: center; margin-top: 50px;"
  form
    label
      |say something:
      input type="text" data-behavior="room_input"

チャンネルの作成

speakというアクションを持つ、Roomチャンネルを作成する。 rails g channel room speakというコマンドを実行すると、以下の通り2つのファイルが作成される。

1
2
3
$ rails g channel room speak
    create  app/channels/room_channel.rb
    create  app/assets/javascripts/channels/room.coffee

app/channels/room_channel.rbはサーバーサイドの処理を受け持つチャンネルである。

1
2
3
4
5
6
7
8
9
10
11
12
13
# Be sure to restart your server when you modify this file. Action Cable runs in an EventMachine loop that does not support auto reloading.
class RoomChannel < ApplicationCable::Channel
  def subscribed
    # stream_from "some_channel"
  end

  def unsubscribed
    # Any cleanup needed when channel is unsubscribed
  end

  def speak
  end
end

app/assets/javascripts/channels/room.coffeeはクライアントサイドの処理を受け持つチャンネルである。

1
2
3
4
5
6
7
8
9
10
11
12
App.room = App.cable.subscriptions.create "RoomChannel",
  connected: ->
    # Called when the subscription is ready for use on the server

  disconnected: ->
    # Called when the subscription has been terminated by the server

  received: (data) ->
    # Called when there's incoming data on the websocket for this channel

  speak: ->
    @perform 'speak'

routesにmountする

Action Cableを有効にするため、mount ActionCable.server => '/cable'をroutesに追加。

1
2
3
4
5
6
Rails.application.routes.draw do
  # (省略)

  # Serve websocket cable requests in-process
  mount ActionCable.server => '/cable'
end

アクションの設定

app/assets/javascripts/channels/room.coffeeで、クライアントサイドのspeakアクションを定義する。 ここではサーバーサイドのspeakアクションを呼びだし、messageをパラメータとして渡す。

1
2
3
4
5
App.room = App.cable.subscriptions.create "RoomChannel",
  # (省略)

  speak: (message) ->
    @perform 'speak', message: message

次に、app/channels/room_channel.rbを編集して、サーバーサイドのspeakアクションを定義する。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class RoomChannel < ApplicationCable::Channel
  def subscribed
    # stream_from "some_channel"
    stream_from "room_channel"
  end

  # (省略)

  def speak(data)
    if room = Room.find(params[:id])
      room.messages.create! body: data['message']
    end
  end
end

speakのメソッドが呼ばれるとモデルを生成する。モデルが生成されたらjobを通して画面を更新するようにする。

フォームを使ったデータの送信

さっきapp/views/rooms/show.html.slimのところに

1
2
3
4
5
div style="text-align: center; margin-top: 50px;"
  form
    label
      |say something:
      input type="text" data-behavior="room_input"

を書いておいたからこのフォームを使ってデータを送信する。 app/assets/javascripts/channels/room.coffee

1
2
3
4
5
6
7
8
9
10
11
12
$(document).on 'keypress', '[data-behavior~=room_input]', (event) ->
  if event.keyCode is 13 # return = send
    if !(event.target.value == '')
       App.room.speak event.target.value
       event.target.value = ''
       event.preventDefault()
  else
    event.preventDefault()
$(document).on 'click', '.remove-icon', (event) ->
  id = $(event.target).data('message-id')
  App.room.remove id
  event.target.value = ''

データの保存の後、ブロードキャスト処理

次に、Messageモデルのコールバックを定義し、データが作成されたら非同期でブロードキャスト処理を実行するようにします。トランザクションをコミットしたあとでブロードキャストしないと、他のクライアントからデータが見えない恐れがあるのでafter_createではなくafter_create_commitを使う。

1
2
3
4
5
6
class Message < ApplicationRecord
  belongs_to :room, class_name: "Room", foreign_key: :room_id

  after_create_commit { MessageBroadcastJob.perform_later self }
  after_destroy_commit { MessageBroadcastJob.perform_later self.id }
end

続いて、非同期でブロードキャストするためのMessageBroadcastジョブを作成する。

1
$ rails g job message_broadcast

ApplicationController.renderer.renderメソッドを使うと、コントローラ以外の場所でビューをレンダリングできます。なのでこのジョブにはパーシャルビューのHTMLを返す。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class MessageBroadcastJob < ApplicationJob
  queue_as :default

  def perform(message)
    if message.is_a?(ActiveRecord::Base)
      ActionCable.server.broadcast 'room_channel', message: render_message(message)
    else
      ActionCable.server.broadcast 'room_channel', id: message
    end
  end

  def render_message(message)
    ApplicationController.renderer.render(partial: 'messages/message', locals: {message: message})
  end
end

サーバーからデータを受け取ったらブラウザ内の表示を書き換える

ジョブから返されたパーシャルビューはapp/assets/javascripts/channels/room.coffeereceivedメソッドに渡されるのでreceivedメソッドを編集する。 今回はメッセージの削除も行うのでメッセージを受け取った場合と削除ボタンを押した場合を分岐して処理する。

1
2
3
4
5
6
7
8
9
10
# (省略)

received: (data) ->
  # Called when there's incoming data on the websocket for this channel
  if data['message'] != undefined
    $('#myRoom').append data['message']
  else
    $('.message_' + data['id']).remove()

# (省略)

ログの内容

ビューでhello, rails!とメッセージを入力すると下記のログが出る。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
RoomChannel#speak({"message"=>"hello, rails!"})
  Room Load (0.4ms)  SELECT  "rooms".* FROM "rooms" WHERE "rooms"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
  User Load (0.3ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 4], ["LIMIT", 1]]
   (0.1ms)  BEGIN
  CACHE (0.0ms)  SELECT  "rooms".* FROM "rooms" WHERE "rooms"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
  SQL (0.9ms)  INSERT INTO "messages" ("body", "created_at", "updated_at", "room_id", "commenter_type", "commenter_id") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"  [["body", "hello, rails!"], ["created_at", 2017-03-02 10:04:50 UTC], ["updated_at", 2017-03-02 10:04:50 UTC], ["room_id", 2], ["commenter_type", "User"], ["commenter_id", 4]]
   (1.2ms)  COMMIT
[ActiveJob] Enqueued MessageBroadcastJob (Job ID: f1d4d926-add7-40d9-a0c7-08d96e413680) to Async(default) with arguments: #<GlobalID:0x007feee520cf20 @uri=#<URI::GID gid://practice/Message/335>>
  Message Load (0.3ms)  SELECT  "messages".* FROM "messages" WHERE "messages"."id" = $1 LIMIT $2  [["id", 335], ["LIMIT", 1]]
[ActiveJob] [MessageBroadcastJob] [f1d4d926-add7-40d9-a0c7-08d96e413680] Performing MessageBroadcastJob from Async(default) with arguments: #<GlobalID:0x007feee5214ae0 @uri=#<URI::GID gid://practice/Message/335>>
[ActiveJob] [MessageBroadcastJob] [f1d4d926-add7-40d9-a0c7-08d96e413680]   User Load (0.3ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 4], ["LIMIT", 1]]
[ActiveJob] [MessageBroadcastJob] [f1d4d926-add7-40d9-a0c7-08d96e413680]   Rendered u/messages/_message.html.slim (4.7ms)
[ActiveJob] [MessageBroadcastJob] [f1d4d926-add7-40d9-a0c7-08d96e413680] [ActionCable] Broadcasting to room_channel: {:message=>"<div class=\"message message_335\"><div class=\"message-p\">user4@example.com : hello, rails!<i class=\"fa fa-times remove-icon\" data-message-id=\"335\"></i></div></div>"}
[ActiveJob] [MessageBroadcastJob] [f1d4d926-add7-40d9-a0c7-08d96e413680] Performed MessageBroadcastJob from Async(default) in 15.06ms
RoomChannel transmitting {"message"=>"<div class=\"message message_335\"><div class=\"message-p\">user4@example.com : hello, rails!<i class=\"fa fa-times remove-icon\" data-message-id=\"335\"></i></div></div>"} (via streamed from room_channel)

そして、削除ボタンを押したら下記のログが出る。

1
2
3
4
5
6
7
8
9
10
11
RoomChannel#remove({"id"=>335})
  Room Load (0.2ms)  SELECT  "rooms".* FROM "rooms" WHERE "rooms"."id" = $1 LIMIT $2  [["id", 2], ["LIMIT", 1]]
  Message Load (0.4ms)  SELECT  "messages".* FROM "messages" WHERE "messages"."room_id" = $1 AND "messages"."id" = $2 LIMIT $3  [["room_id", 2], ["id", 335], ["LIMIT", 1]]
   (0.1ms)  BEGIN
  SQL (0.3ms)  DELETE FROM "messages" WHERE "messages"."id" = $1  [["id", 335]]
   (1.2ms)  COMMIT
[ActiveJob] [MessageBroadcastJob] [694e3186-c328-4327-8c2c-686de737f7ee] Performing MessageBroadcastJob from Async(default) with arguments: 335
[ActiveJob] Enqueued MessageBroadcastJob (Job ID: 694e3186-c328-4327-8c2c-686de737f7ee) to Async(default) with arguments: 335
[ActiveJob] [MessageBroadcastJob] [694e3186-c328-4327-8c2c-686de737f7ee] [ActionCable] Broadcasting to room_channel: {:id=>335}
[ActiveJob] [MessageBroadcastJob] [694e3186-c328-4327-8c2c-686de737f7ee] Performed MessageBroadcastJob from Async(default) in 0.6ms
RoomChannel transmitting {"id"=>335} (via streamed from room_channel)

参考

Rails 5 + ActionCableで作る!シンプルなチャットアプリ(DHH氏のデモ動画より)

Firebase Analyticsを利用してEventを発生させる方法

Android

アプリにFirebase追加

Rootのbuild.gradleファイルにgoogle-servicesプラグインを追加する

1
2
3
4
5
6
7
buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

次にモジュールのbuild.gradleファイルにapply pluginを追加して使用設定をする

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
apply plugin: 'com.android.application'

android {
  // ...
}

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:10.0.1'

  // Getting a "Could not find" error? Make sure you have
  // the latest Google Repository in the Android SDK manager
}

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

最後にgoogle-services.jsonファイルをプロジェクトに追加する

Android Manifestファイルの設定

まず、Android Manifestファイルに下記の設定をする

1
2
3
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

Firebase Analyticsの設定

上記のコードのように

compile ‘com.google.firebase:firebase-core:10.0.1’

を追加するとFirebaseのAnalyticsを使用できるようになる それからプロジェクトのActivityに変数を作る

1
private FirebaseAnalytics mFirebaseAnalytics;


onCreate()メソッドに

1
2
// Obtain the FirebaseAnalytics instance.
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);

を追加する

Eventの設定

Eventをかけたいところ(たとえば、リンクとかタブなど)に

1
2
3
4
5
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, name);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);

のように追加するとFirebaseで事前定義されたEventに記録することができる 上記の例にはSELECT_CONTENTというEventにITEM_ID,ITEM_NAMEというValueを記録するようになる

Eventのカスタマイズ

1
2
3
4
Bundle params = new Bundle();
params.putString("image_name", name);
params.putString("full_text", text);
mFirebaseAnalytics.logEvent("share_image", params);

上記の例にはshare_imageというEventにimage_name,full_textというValue記録するようになる

Eventの確認

記録されたEventはFirebase Analyticsのダッシュボードで24時間以内に確認できる

iOS - Swift

アプリにFirebase追加

プロジェクトにpodを追加する podがなければプロジェクトDirectoryでpod initをしてpodfileを生成する それからpodfileに次のようにpodを追加する

1
pod 'Firebase/Core'

コンソールで

1
$ pod install

Firebaseの呼び出し

プロジェクトのDelegateに

1
import Firebase

そしてapplication:didFinishLaunchingWithOptions:メソッドに下記のようにFirebaseを呼び出す

1
FIRApp.configure()

Eventの設定

下記はkFIRSelectContentの基本Eventを記録する方法である

1
2
3
4
5
FIRAnalytics.logEvent(withName: kFIREventSelectContent, parameters: [
  kFIRParameterItemID: "id-\(title!)" as NSObject,
  kFIRParameterItemName: title! as NSObject,
  kFIRParameterContentType: "cont" as NSObject
])

Eventのカスタマイズ

1
2
3
4
FIRAnalytics.logEvent(withName: "share_image", parameters: [
  "name": name as NSObject,
  "full_text": text as NSObject
])

こういうふうにshare_imageというEventにname,full_textというValueを記録することができる

Eventの確認

記録されたEventはFirebase Analyticsのダッシュボードで24時間以内に確認できる

参考

Firebase Document Analytics Event Android
Firebase Document Analytics Event iOS

カウンターキャッシュについて

カウンターキャッシュとは

  • Rails3からの機能で、以下のように設定することにより関連するテーブルのレコード数を簡単にカウントさせることができる

設定

1
2
3
4
5
6
7
class Survey < ApplicationRecord
  has_many :questions, class_name: "Question", foreign_key: :survey_id, dependent: :destroy
end

class Question < ApplicationRecord
  belongs_to :survey, class_name: "Survey", foreign_key: :survey_id, touch: true, counter_cache: :questions_count
end

のような関係を持つモデルの子モデルに

1
2
3
class Question < ApplicationRecord
  belongs_to :survey, class_name: "Survey", foreign_key: :survey_id, touch: true, counter_cache: :questions_count
end

counter_cache: :カラム名のように追加する
それからmigrationを追加する

1
rails g migration add_column_questions_count_to_qualitative_surveys

そこに

1
2
3
4
5
6
7
8
9
10
11
12
13
class AddColumnInquiresCountToSurveys < ActiveRecord::Migration[5.0]
  def change
    add_column :surveys, :questions_count, :integer, default: 0
  end

  reversible do |dir|
    dir.up do
      Survey.all.each do |survey|
        Survey.reset_counters(survey.id, :questions)
      end
    end
  end
end

default: 0を追加し、今持っている子モデルのカウントをセッティングする場合は上記のようにreset_countersメソッドを使って更新する consoleで確認してみたら

1
2
3
4
5
irb(main):001:0> survey = Survey.last
Survey Load (6.0ms)  SELECT  "surveys".* FROM "surveys" ORDER BY "surveys"."id" DESC LIMIT $1  [["LIMIT", 1]]
=> #<Survey id: 83, title: "Survey_title_49", content: nil, created_at: "2017-02-08 10:26:51", updated_at: "2017-02-16 02:55:41", questions_count: 43>
irb(main):002:0> survey.questions_count
=> 43

のように確認できる

Railsにおけるキャッシュの使い方

キャッシュ

  • キャッシュとは、使用頻度の高いデータを高速な記憶装置に蓄えておくことにより、いちいち低速な装置から読み出す無駄を省いて高速化すること。また、その際に使われる高速な記憶装置や、複製されたデータそのもののこと。

Railsにおけるキャッシュ

Rails3

  • ページキャッシュ(ページ全体をキャッシュ)
  • アクションキャッシュ(アクション単位でキャッシュ)
  • フラグメントキャッシュ(ページの一部をキャッシュ)

Rails4

Rails4ではページキャッシュとアクションキャシュは廃止され、フラグメントキャシュのみ使える。

フラグメントキャッシュとは

rails で利用できる view の一部分をキャッシュする機能。rails 3以上ならデフォルトで利用できる。railsは view のレンダリングが遅いので、アクセスの多いサイトはキャッシュの利用が必要になってくる。

書き方(Slim)

1
2
- cache {some_key} do
  = # cache したい HTML

キーにStringを指定した場合

下記のような場合に、

1
2
- cache "key" do
  = @some_db_data

この@some_db_dataの中身が変更されても、キャッシュには変更が反映されない。キャッシュのキーに含まれるdigestはあくまでHTMLを元に作られるため、データの変更があってもdigestは変更されないからである。
また、自動で付与されるdigestを利用しないようにするには

1
2
- cache "key", skip_digest: true do
  = @some_db_data

とする。この場合、HTMLに変更があったとしても、キャッシュには反映されず変更前のものが表示される。

キーを省略した場合

1
2
- cache do
  = @some_db_data

上記のように、キーを省略した場合は、ページのurlからキーが自動で作られる。url依存のキーなので、同じページでこの形を複数記述すると、どちらかのキャッシュが上書きされてめちゃくちゃになる。

キーにオブジェクトを指定した場合

1
2
- cache @object do
  = @object.text

オブジェクトを指定した場合は、@object.cache_keyがキャッシュのキーとなる。ActiveRecordのオブジェクトの場合、IDや、updated_atを元にキーが作成されるので、オブジェクトのupdated_atが変更されると自動でキャッシュも更新される。

1
2
3
- cache @objects do
  - @objects.each do |object|
    = object.text

上記のように配列にした場合は、各オブジェクトに対して cache_key が呼ばれてそれを連結したものがキャッシュのキーになる。よって配列の順番や中身が変更されればキャッシュは更新される。

Russian Doll Caching(ロシアンドールキャッシング)とは

ネストされたフラグメントキャッシュの内側のキャッシュが更新されると、外側のキャッシュも更新してくれる機能。rails 4ならデフォルトで利用可能。

1
2
3
4
5
6
7
8
- cache @company do
  h1
    = @company.name
  ul
    - cache @company.members
      - @company.members.each do |member|
        li
          = member.name

上記のようなネストされた構造のとき、membersに変更があったとしても、companyに変更がなければcompanyのキーが変更されず、キャッシュは更新されない。
しかし、memberのmodelに

1
2
3
class Member < ActiveRecord::Base
  belongs_to :company, touch: true
end

と書いておくと、ネストされた親のキーにも更新が伝搬してくれるようになる。

テスト

70個の親テーブルと1440個の子テーブルをViewに出すことでキャッシュのテストを実行してみたら、

  • キャッシュしていない場合
1
Completed 200 OK in 791ms (Views: 685.4ms | ActiveRecord: 93.5ms)
  • キャッシュした場合
1
Completed 200 OK in 31ms (Views: 28.8ms | ActiveRecord: 0.7ms)

圧倒的な結果が出てきた。

参照

RailsにおけるCacheの概念と使い方
rails 4 の fragment cache(フラグメントキャッシュ)まとめ

Railsのincludesとjoins

Rails側で関係あるモデル同士をまとめて取得したいときがある。そのとき効率的に使えるのがincludesjoins。だが、この二つは振る舞いがちょっと違うので二つの違いや使い方をまとめてみる。
includesはデータを先読みしてキャッシュするのでさらに効率的に使える。でもその分のメモリが必要になる。
joinsはただinner joinしてくれる。

モデル環境

以下のような関係のモデルのクラスがあるとする。

1
2
3
4
5
6
7
class Survey < ApplicationRecord
  has_many :questions, class_name: "Question", foreign_key: :survey_id, dependent: :destroy
end

class Question < ApplicationRecord
  belongs_to :survey, class_name: "Survey", foreign_key: :survey_id
end

includes


  • 使い方
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
irb(main):001:0> Survey.includes(:questions).each {|survey| p survey.questions.ids}
Survey Load (0.6ms)  SELECT "surveys".* FROM "surveys"
Question Load (1.6ms)  SELECT "questions".* FROM "questions" WHERE "questions"."survey_id" IN (13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]

上記の例をみるとincludesしたらまずsurveyのデータが呼ばれ、そのあとquestionのデータが呼ばれる。
これをincludesしないなら、

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
irb(main):002:0> Survey.all.each {|survey| p survey.questions.ids}
Survey Load (1.0ms)  SELECT "surveys".* FROM "surveys"
 (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
 (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
 (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
 (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
 (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
 (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]

上記のようにsurveyの数の分questionが呼ばれて効率的ではないような振る舞いになる。

joins


  • 使い方

joinsはシンプルにただinner joinしてくれる。

1
2
irb(main):003:0> Survey.joins(:questions)
  Survey Load (1.8ms)  SELECT "surveys".* FROM "surveys" INNER JOIN "questions" ON "questions"."survey_id" = "surveys"."id"

joinsを使えば、joinsの条件のカラムを使って絞り込んだりもできる。

1
2
3
irb(main):004:0> Survey.joins(:questions).where(questions: {survey_id: Survey.first.id})
  Survey Load (0.2ms)  SELECT  "surveys".* FROM "surveys" ORDER BY "surveys"."id" ASC LIMIT $1  [["LIMIT", 1]]
  Survey Load (0.4ms)  SELECT "surveys".* FROM "surveys" INNER JOIN "questions" ON "questions"."survey_id" = "surveys"."id" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]

注意しなければいけないのは、inner joinした結果のレコード一つ一つが一つのオブジェクトにマッピングされて返ってくる事。で、返ってくるレコードの数は違ってくる。

1
2
3
4
5
6
7
8
9
irb(main):005:0> Survey.all.size
   (2.1ms)  SELECT COUNT(*) FROM "surveys"
=> 20
irb(main):006:0> Survey.includes(:questions).size
   (0.4ms)  SELECT COUNT(*) FROM "surveys"
=> 20
irb(main):007:0> Survey.joins(:questions).size
   (1.8ms)  SELECT COUNT(*) FROM "surveys" INNER JOIN "questions" ON "questions"."survey_id" = "surveys"."id"
=> 400

includes + joins

先読みもしながら絞り込んで検索したいならincludesとjoinsを一緒に使う方法もある。 ただjoinsだけでデータを読んだら

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
irb(main):008:0> Survey.joins(:questions).each {|survey| p survey.questions.ids}
  Survey Load (2.0ms)  SELECT "surveys".* FROM "surveys" INNER JOIN "questions" ON "questions"."survey_id" = "surveys"."id"
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (1.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (3.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (1.1ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (2.0ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.9ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 13]]
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 14]]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.9ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 15]]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (5.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 16]]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 17]]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (2.8ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (1.1ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 18]]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (2.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 19]]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.9ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 20]]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 21]]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (2.1ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 22]]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 23]]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
   (3.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.8ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 24]]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 25]]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 26]]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 27]]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (2.0ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 28]]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
   (0.8ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (1.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (1.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 29]]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.5ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.7ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (3.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (2.1ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 30]]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.6ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 31]]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.3ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.2ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]
   (0.4ms)  SELECT "questions"."id" FROM "questions" WHERE "questions"."survey_id" = $1  [["survey_id", 32]]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]

一つ一つテーブルを読んでくるので非効率だが、includesにjoinsを寄せれば

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
irb(main):009:0> Survey.includes(:questions).joins(:questions).each {|survey| p survey.questions.ids}
  SQL (2.0ms)  SELECT "surveys"."id" AS t0_r0, "surveys"."title" AS t0_r1, "surveys"."content" AS t0_r2, "surveys"."created_at" AS t0_r3, "surveys"."updated_at" AS t0_r4, "questions"."id" AS t1_r0, "questions"."survey_id" AS t1_r1, "questions"."text" AS t1_r2, "questions"."created_at" AS t1_r3, "questions"."updated_at" AS t1_r4 FROM "surveys" INNER JOIN "questions" ON "questions"."survey_id" = "surveys"."id"
[10083, 10084, 10085, 10086, 10087, 10088, 10089, 10090, 10091, 10092, 10093, 10094, 10095, 10096, 10097, 10098, 10099, 10100, 10101, 10102]
[10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120, 10121, 10122]
[10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131, 10132, 10133, 10134, 10135, 10136, 10137, 10138, 10139, 10140, 10141, 10142]
[10143, 10144, 10145, 10146, 10147, 10148, 10149, 10150, 10151, 10152, 10153, 10154, 10155, 10156, 10157, 10158, 10159, 10160, 10161, 10162]
[10163, 10164, 10165, 10166, 10167, 10168, 10169, 10170, 10171, 10172, 10173, 10174, 10175, 10176, 10177, 10178, 10179, 10180, 10181, 10182]
[10183, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191, 10192, 10193, 10194, 10195, 10196, 10197, 10198, 10199, 10200, 10201, 10202]
[10203, 10204, 10205, 10206, 10207, 10208, 10209, 10210, 10211, 10212, 10213, 10214, 10215, 10216, 10217, 10218, 10219, 10220, 10221, 10222]
[10223, 10224, 10225, 10226, 10227, 10228, 10229, 10230, 10231, 10232, 10233, 10234, 10235, 10236, 10237, 10238, 10239, 10240, 10241, 10242]
[10243, 10244, 10245, 10246, 10247, 10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262]
[10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282]
[10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302]
[10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322]
[10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342]
[10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362]
[10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382]
[10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402]
[10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422]
[10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442]
[10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462]
[10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482]

こういうふうに効率的データを読んでくるのができる。

参照

Activerecordにおけるincludesとjoinsの振る舞いについて
似ているようで全然違う!?Activerecordにおけるincludesとjoinsの振る舞いまとめ

RailsのModelのコールバック

Active Recordのコールバック

Rails側では、内部でオブジェクトが作成されたり、更新されたり削除されたりする。コールバックとは、オブジェクトのライフサイクル期間における特定の瞬間に呼び出されるメソッドである。
コールバックを利用することで、Active Recordオブジェクトが作成、保存、更新、削除などのイベント発生の時に常に実行されるコードを書くことができる。

種類と順番

  • オブジェクトの生成

    • before_validation
    • after_validation
    • before_save
    • around_save
    • before_create
    • around_create
    • after_create
    • after_save
  • オブジェクトの更新

    • before_validation
    • after_validation
    • before_save
    • around_save
    • before_update
    • around_update
    • after_update
    • after_save
  • オブジェクトの削除

    • before_destroy
    • around_destroy
    • after_destroy
  • オブジェクトのinstance化

    • after_initialize
  • find

    • after_find
  • touch

    • after_touch

使い方

普通にモデルクラスの中に書いたら良い。

1
2
3
4
5
6
7
class Admin < ApplicationRecord
  before_validation :hoge

  def hoge
    "何かのコード"
  end
end
1
2
3
4
5
class Admin < ApplicationRecord
  before_validation do
    "何かのコード"
  end
end
1
2
3
class Admin < ApplicationRecord
  before_validation -> { "何かのコード" }
end

上の三つの書き方で自分が実行したい瞬間に実行されるコードを書くことができる。


参照

Active Record コールバック
Rails4でモデルのコールバックの一覧と順番
Railsのcallbackについて調べた
ActiveRecordのコールバックの順序・コールバック内のロールバック処理について

RailsのモデルのSTI(Single Table Inheritance)とポリモーフィックの実装

RailsのActiveRecordには単一テーブル継承(STI)とポリモーフィック関係という二つの便利な関係性設定がある。同じような機能を持っているモデルが多数存在してそのモデルたちをまとめたいときとか、多数のモデルが一つのモデルを持ちたいときなどの複雑な関係性をもっと簡単にしてくれるのでその二つの関係性をまとめる。

STI

状況設定

例えば、本とコンピューターを同時に管理するproductsというモデルを作る。もちろんbooks、computersの二つのモデルを作ってもできなくはないけどSTIを通して実装すればテーブルを作らなくてもproductsの一つのテーブルで管理できる。

Productモデル作成

1
2
$ rails g model product name:string price:integer type:string author:string category:string maker:string inch:integer
$ rake db:migrate

ここでtypeは必須になる。author, categoryはbookのために、maker, inchはcomputerのためのcolumnになる。

class作成

1
2
class Product < ApplicationRecord
end

こういうclassが作られたら実際に使いたいbook、computerのclassを作成。

1
2
class Book < Product
end
1
2
class Computer < Product
end

気をつけないとならないのはProductのclassを継承すること。
これで設定は完了。
すると、

1
Computer.create(name: 'お得パソコン', price: 100000, maker: 'apple', inch: 15)

こういうふうにデータを作成したら

1
INSERT INTO "products" ("name", "price", "type", "maker", "inch", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"  [["name", "お得パソコン"], ["price", 100000], ["type", "Computer"], ["maker", "apple"], ["inch", 15], ["created_at", 2017-01-18 08:57:39 UTC], ["updated_at", 2017-01-18 08:57:39 UTC]]

こんな結果になり、Productテーブルに保存される。typeはclass名になる。
呼び出すのも簡単にComputer.find(Product.id)Computer.allでできる。
Computer.find(Product.id)を実行したら

1
<Computer id: 1, name: "お得パソコン", price: 100000, type: "Computer", author: nil, category: nil, maker: "apple", inch: 15, created_at: "2017-01-25 06:44:17", updated_at: "2017-01-25 06:44:17">

bookのために作ったcolumnは全部nilになる。つまり、一つのテーブルで三つのテーブルを使うようにはなるけど無駄なcolumnが多くなるデメリットもある。

Polymorphic

状況設定

プロジェクトの中で一つのモデルを多数のモデルに関係をつける時がある。
例えば、掲示板の投稿をユーザーが作成した場合と管理者が作成した場合があるとするとPolymorphicで管理できる。

ポリモフィックなテーブルの作成

1
2
3
4
$ rails g model admin name:string email:string
$ rails g model user name:string email:string
$ rails g model post owner:references{polymorphic}:index title:string content:text
$ rake db:migrate

するとpostのmigrationは下記のようになる。

1
2
3
4
5
6
7
8
9
10
11
class CreatePosts < ActiveRecord::Migration[5.0]
  def change
    create_table :posts do |t|
      t.references :owner, polymorphic: true
      t.string :title
      t.text :content

      t.timestamps
    end
  end
end

モデルにbelongs_toとhas_many追加

上記のように実行したらpostのクラスはさらにこういうふうになってます。そしてpostのテーブルにはowner_type, owner_idが生成されます。

1
2
3
class Post < ApplicationRecord
  belongs_to :owner, polymorphic: true
end

そこでadminとuser側だけhas_manyを追加したら良いです。

1
2
3
4
5
6
7
class Admin < ApplicationRecord
  has_many :posts, as: :owner, dependent: :destroy
end

class User < ApplicationRecord
  has_many :posts, as: :owner, dependent: :destroy
end

実行

そうした上にconsoleに下記のように実行してみる。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
admin = Admin.create(name: 'admin1', email: 'admin@example.com')
=> #<Admin id: 1, name: "admin1", email: "admin@example.com", created_at: "2017-01-25 07:46:25", updated_at: "2017-01-25 07:46:25">
post1 = admin.posts.create(title: 'post1', content: 'content1')
=> #<Post id: 1, owner_type: "Admin", owner_id: 1, title: "post1", content: "content1", created_at: "2017-01-25 07:47:21", updated_at: "2017-01-25 07:47:21">
post1.owner
=> #<Admin id: 1, name: "admin1", email: "admin@example.com", created_at: "2017-01-25 07:46:25", updated_at: "2017-01-25 07:46:25">
user = User.create(name: 'user1', email: 'user@example.com')
=> #<User id: 1, name: "user1", email: "user@example.com", created_at: "2017-01-25 07:48:00", updated_at: "2017-01-25 07:48:00">
post2 = user.posts.create(title: 'post2', content: 'content2')
=> #<Post id: 2, owner_type: "User", owner_id: 1, title: "post2", content: "content2", created_at: "2017-01-25 07:49:04", updated_at: "2017-01-25 07:49:04">
post2.owner
=> #<User id: 1, name: "user1", email: "user@example.com", created_at: "2017-01-25 07:48:00", updated_at: "2017-01-25 07:48:00">


Post.find_by(owner: admin)
=> #<Post id: 1, owner_type: "Admin", owner_id: 1, title: "post1", content: "content1", created_at: "2017-01-25 07:47:21", updated_at: "2017-01-25 07:47:21">
Post.find_by(owner: user)
=> #<Post id: 2, owner_type: "User", owner_id: 1, title: "post2", content: "content2", created_at: "2017-01-25 07:49:04", updated_at: "2017-01-25 07:49:04">

こういうふうに活用できる。


参照

Rails4でポリモフィックのリレーションを実装する
Rails4でSTI(単一継承テーブル)を行う
Rails ActiveRecordのSTI(Single Table Inheritance)の使い方

ビルド環境設定(XCode)2

問題

この前、ここの記事のようにビルド環境を分けようとしてたが、環境を分けるだけで環境別に変数を設定したりするのは一つ一つ書かないといけなかったので、あまりも効率的ではなっかたからもっといい方法があるだろうと思って調べた結果をまとめる。

ソリューション

例えば、Railsにはymlファイルに環境別に変数を設定したり、environmentsフォルダーにconfigの設定をするようにXCodeにもPlistファイルに設定して使う。前の記事に続いてセッティングしたら良いと。

使い方

1. info.plistを編集

Alt text

2. Environment.plistを追加

plistの新規作成 Alt text 項目追加 Alt text

3. AppDelegateに設定

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  let bundle = NSBundle.bundle()
  // Configuration取得
  let configuration = bundle.infoDictionary!["Configuration"]

  // Configurations.plist読み込み
  let path = bundle.pathForResource("Environments", ofType: "plist")
  let configurations = NSDictionary(contentsOfFile: path!)

  // URL取得
  let variables = configurations?.objectForKey(configuration!) as! [String : AnyObject]

  let urlStr = variables["URL"]

  (略)

4. ViewController

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import UIKit

class ViewController: UIViewController, UIWebViewDelegate {

  @IBOutlet weak var webView: UIWebView!
  var appDelegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate

  override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.webView.delegate = self
        let initialUrl = NSURL(string: self.appDelegate.urlStr)
        let request = NSURLRequest(url:initialUrl as! URL)
        self.webView.loadRequest(request as URLRequest)
        webView.scrollView.isScrollEnabled = true
  }

  (略)

5. 使いやすい方法

Configurationクラスを新規作成

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import Foundation

final class ConfigurationManager {

    private static let sharedInstance = ConfigurationManager()

    private var configuration: String
    private var variables: NSDictionary

    private init() {

        // Singletonの確認用
        print("Configuration initialization")

        let bundle = Bundle.main
        // Fetch Current Configuration
        self.configuration = (bundle.infoDictionary?["Configuration"]) as! String
        // Load Configurations
        guard let path = bundle.path(forResource: "Environments", ofType: "plist") else {
            self.variables = [:]
            return
        }
        let configurations =  NSDictionary(contentsOfFile: path)
        // Load Variables for Current Configuration
        self.variables = configurations?.object(forKey: self.configuration) as! NSDictionary
    }

    class func Configuration() -> String {
        return sharedInstance.configuration
    }

    class func URL() -> String {
        guard let url = sharedInstance.variables["URL"] else {
            return ""
        }
        return url as! String
    }
}

Appdelegate編集

1
2
3
4
5
6
7
8
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  let urlStr = ConfigurationManager.URL()

  (略)

6. 結果

適用

1. Environment.plistに追加

Alt text

2. ConfigurationManager.swiftにコード追加

1
2
3
4
5
6
7
8
9
10
11
12
13
import Foundation

final class ConfigurationManager {

  (略)

  class func BarColor() -> NSDictionary {
      guard let barColor = sharedInstance.variables["BarColor"] else {
          return "" as! NSDictionary
      }
      return barColor as! NSDictionary
  }
}

3. AppDelegate

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  var window: UIWindow?
  let urlStr = ConfigurationManager.URL()
  let barColor = ConfigurationManager.BarColor()
  let appEnvironment = ConfigurationManager.Configuration()


  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
      // Override point for customization after application launch.

      return true
  }

  (略)

}

4. ViewController

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import UIKit

class ViewController: UIViewController, UIWebViewDelegate {

    @IBOutlet weak var webView: UIWebView!
    var appDelegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
    @IBOutlet weak var Environment: UILabel!

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.webView.delegate = self
        let initialUrl = NSURL(string: self.appDelegate.urlStr)
        let request = NSURLRequest(url:initialUrl as! URL)
        self.webView.loadRequest(request as URLRequest)
        webView.scrollView.isScrollEnabled = true
        Environment.text = appDelegate.appEnvironment
        Environment.backgroundColor = UIColor(red: self.appDelegate.barColor["Red"] as! CGFloat, green: self.appDelegate.barColor["Green"] as! CGFloat, blue: self.appDelegate.barColor["Blue"] as! CGFloat, alpha: 1.0)
        Environment.textColor = UIColor.white
        Environment.textAlignment = .center

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

5. 結果



参照

http://stackoverflow.com/questions/40230396/ios-simple-way-to-manage-rest-end-points/40230742#40230742
http://qiita.com/negibouze/items/1c1c977cab5ef26224fd

ビルド環境設定(Android Studio)2

はじめに

前回にAndroidStudio, XCodeのビルド環境設定の記事を書いたとき、環境変数とか環境によって違う機能を分けることについてもっといい方法があるんじゃないかなという疑問ができたので調べてみたのをまとめた。
その中で見つけたのがbuildConfigFieldだった。
buildConfigFieldbuild.gradlebuildTypesproductFlavorsに使える定義するものである。

gradle.properties

ちなみに、build.gradleはgitや他のバージョン管理ツールで公開されるので直接書くのではなくて、gradle.propertiesから読み込む方法をとる。
まずはgradle.propertiesに設定をする。build.gradleにはString、int、array、double、floatなどいろんなobjectを宣言可能だが今回はシンプルにwebviewのurlを使うためのStringを設定してみる。

1
2
google_url=https://www.google.co.jp
yahoo_url=http://www.yahoo.co.jp


gradle.propertiesに設定をしたらbuild.gradleにも設定をする。

1
2
3
4
5
6
7
8
productFlavors {
  google {
    buildConfigField("String", "MAIN_URL", "\"${google_url}\"")
  }
  yahoo {
    buildConfigField("String", "MAIN_URL", "\"${yahoo_url}\"")
  }
}

第一変数はobjectの種類、第二変数は実際に使う名前、第三変数はgradle.propertiesで設定した名前になる。こういうふうにしたらすぐ使えるようになる。それではwebviewのところで

1
mWebView.loadUrl(MAIN_URL);

こんなにstatic変数のように使う。すると、

yahooのFlavors

googleのFlavors


これの上にアプリの名前も変えてみよう。
gradle.propertiesにアプリの名前に使うStringを設定する。

1
2
3
4
google_url=https://www.google.co.jp
yahoo_url=http://www.yahoo.co.jp
google_appName=Googleアプリ
yahoo_appName=Yahooアプリ

あと、build.gradleに追加します。

1
2
3
4
5
6
7
8
9
10
productFlavors {
  google {
    buildConfigField("String", "MAIN_URL", "\"${google_url}\"")
    resValue "string", "appName", "\"${google_appName}\""
  }
  yahoo {
    buildConfigField("String", "MAIN_URL", "\"${yahoo_url}\"")
    resValue "string", "appName", "\"${yahoo_appName}\""
  }
}

ちなみにbuild.gradleresValueと設定したらリソースとして使用できる。
第一変数はリソースの種類(ここはStringではなく、stringにすることを注意)、第二変数は実際に使う名前、第三変数はgradle.propertiesで設定した名前になる。そしてAndroidManifest@string/appNameとすると、

yahooのFlavors

googleのFlavors

日本語がちゃんと出てこない。

1
2
3
4
5
6
7
8
9
10
productFlavors {
  google {
    buildConfigField("String", "MAIN_URL", "\"${google_url}\"")
    resValue "string", "appName", "\"Googleアプリ\""
  }
  yahoo {
    buildConfigField("String", "MAIN_URL", "\"${yahoo_url}\"")
    resValue "string", "appName", "\"Yahooアプリ\""
  }
}


productFlavorsに直接書いたら、

yahooのFlavors

googleのFlavors


アプリ名も変えられる。でもなんで日本語がうまく出てこないのかの疑問ができたので今度また調べてまとめることにしよう。


参照

http://sakebook.hatenablog.com/entry/2015/11/20/015829 http://ja.stackoverflow.com/questions/31140/androidstudio%E3%81%A7%E5%90%84%E3%83%93%E3%83%AB%E3%83%89%E3%81%AB%E3%81%9D%E3%82%8C%E3%81%9E%E3%82%8C%E3%81%AE%E5%A4%89%E6%95%B0%E3%82%84%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E4%BD%9C%E3%82%8B