Compare commits

..

91 Commits

Author SHA1 Message Date
Donal McBreen
c985fa33d1 Bump version for 1.4.0 2024-03-20 09:27:23 +00:00
Donal McBreen
e8b9f8907f Merge pull request #715 from basecamp/use-role-not-string-in-config
Pass around Roles instead of Strings
2024-03-08 08:55:53 +00:00
Donal McBreen
4966d52919 Pass around Roles instead of Strings
Avoid looking up roles by names everywhere. This avoids the awkward
role/role_config naming as well.
2024-03-08 08:44:35 +00:00
Donal McBreen
52bb40add0 Merge pull request #656 from DanielJackson-Oslo/informative-error-message-on-lock
Informative message on lock error
2024-03-07 11:16:18 +00:00
Donal McBreen
73a9276cdd Fix up app command tests 2024-03-07 11:11:20 +00:00
Donal McBreen
8c0784ed4a Merge pull request #634 from alhafoudh/main
Allow lines option to be configured when following app logs
2024-03-07 11:11:08 +00:00
Donal McBreen
089a2d3bba Merge pull request #710 from basecamp/install-wget-or-curl
Install docker with curl or wget
2024-03-07 11:01:30 +00:00
Donal McBreen
bd76d23916 Merge pull request #593 from CleverFew/role_logging_config
Role specific logging configuration
2024-03-07 10:53:34 +00:00
Donal McBreen
fa37fcd10c Merge pull request #585 from tsvallender/docker-network
Add docker-setup hook
2024-03-07 10:51:08 +00:00
Donal McBreen
f5dc0858b0 Update error message to include wget 2024-03-07 10:49:32 +00:00
Donal McBreen
9dddb140b1 Merge pull request #558 from GeNiuS69/add-skip_push-to-setup
Add --skip_push option to setup
2024-03-07 10:26:41 +00:00
Donal McBreen
26b1d57c90 Install docker with curl or wget
If curl is not available to download the docker install script, try
with wget instead.

If neither is available or both fail, return a simple failing script
so that we don't carry on regardless.

Fixes: https://github.com/basecamp/kamal/issues/395
2024-03-07 10:16:03 +00:00
Donal McBreen
b94199415f Convert combine by: '||' to any 2024-03-07 09:10:49 +00:00
Trevor Vallender
f69c45b7ea Add docker-setup hook
This allows the user to make any necessary configuration changes to
Docker before setting up any containers, allowing those configuration
changes to take effect from the outset.
2024-03-06 19:01:48 +00:00
Donal McBreen
32a2ae5b2c Merge pull request #708 from nickhammond/valid_service_name
Remove warning for valid service name
2024-03-06 16:22:04 +00:00
Nick Hammond
37544a6383 Merge branch 'basecamp:main' into valid_service_name 2024-03-06 09:09:13 -07:00
Nick Hammond
a1bc6d61af Switch the regex ordering for hyphen and underscore for service name to remove warning 2024-03-06 09:08:17 -07:00
Donal McBreen
5c32be10f1 Merge pull request #707 from basecamp/boot-strategy-min-limit-1
Ensure a minimum limit of 1 for % boot strategy
2024-03-06 16:06:35 +00:00
Donal McBreen
dc5af03593 Update tests to match single quotes 2024-03-06 16:04:31 +00:00
Donal McBreen
1abd029ea0 Merge pull request #696 from dorianmariecom/patch-1
Replace \`service\` by 'service' so it doesn't get executed by bash
2024-03-06 16:04:11 +00:00
Donal McBreen
c4d0d3e5eb Merge pull request #704 from basecamp/escape-registry-username-password
Escape the docker registry username and password
2024-03-06 15:58:46 +00:00
Donal McBreen
46e7cf8e78 Merge pull request #706 from basecamp/kamal-remove-noop
Ensure `kamal remove` completes without setup
2024-03-06 15:58:34 +00:00
Donal McBreen
c7cfc074b6 Ensure a minimum limit of 1 for % boot strategy
Fixes: https://github.com/basecamp/kamal/issues/681
2024-03-06 15:51:35 +00:00
Donal McBreen
c10f43e365 Merge pull request #692 from nickhammond/valid_service_name
Add a simple validation to the service name to prevent setup issues
2024-03-06 15:24:39 +00:00
Donal McBreen
8e2184d65e Ensure kamal remove completes without setup
If `kamal setup` has not run or errored out part way through,
`kamal remove` should still complete.

Fixes: https://github.com/basecamp/kamal/issues/629
2024-03-06 14:59:26 +00:00
Donal McBreen
2be397b679 Escape the docker registry username and password
Fixes: https://github.com/basecamp/kamal/issues/278
2024-03-06 11:04:55 +00:00
Donal McBreen
cc8c508556 Merge branch 'main' into valid_service_name 2024-03-05 11:02:33 +00:00
Nick Hammond
3b16e047c5 Add hyphen to the allowed character list for service name 2024-03-04 10:03:22 -07:00
Donal McBreen
6563393d9a Merge pull request #627 from aishek/626-mention-sprockets-config-in-deploy-template
Mention Sprockets config in deploy template
2024-03-04 15:31:41 +00:00
Ahmed Al Hafoudh
91f350fcce Merge branch 'basecamp:main' into main 2024-03-04 16:22:28 +01:00
Nick Lozon
e4e9664049 use double quotes 2024-03-04 10:10:51 -05:00
Nick Lozon
1acef5221f test deep_merge 2024-03-04 10:06:30 -05:00
Nick Lozon
788a57e85e role logging_args method, use in app 2024-03-04 10:06:30 -05:00
Nick Lozon
f9a934a01f configuration logging accessor 2024-03-04 10:06:30 -05:00
Aleksandr Borisov
f286fdc374 Update lib/kamal/cli/templates/deploy.yml
Co-authored-by: Donal McBreen <dmcbreen@gmail.com>
2024-03-04 16:26:11 +03:00
Donal McBreen
828cca322b Merge pull request #650 from basecamp/retained-containers
Config the number of containers to keep
2024-03-04 12:05:35 +00:00
Donal McBreen
cb030e8751 Merge pull request #680 from igor-alexandrov/traefik-2.10
Bump default Traefik image to 2.10
2024-03-04 11:58:37 +00:00
Donal McBreen
6892abb4be Config the number of containers to keep
By default we keep 5 containers around for rollback. The containers
don't take much space, but the images for them can.

Make the number of containers to retain configurable, either in the
config with the `retain_containers` setting on the command line
with the `--retain` option.
2024-03-04 11:55:45 +00:00
Donal McBreen
bcfd0ca88a Merge pull request #645 from juan-apa/fix-missing-netscp-require
require missing net/scp dependency
2024-03-04 11:49:43 +00:00
Donal McBreen
2e8071a5b3 Merge pull request #608 from CleverFew/fix_accessory_cli_host_params
Accessory CLI respects `--hosts`
2024-03-04 11:31:50 +00:00
Donal McBreen
200e2686fd Merge pull request #506 from rience/custom-acc-service-name
Allow for Custom Accessory Service Name
2024-03-04 10:57:10 +00:00
Donal McBreen
db94789dc1 Merge pull request #434 from rience/ssh-agent-support
Supports Passing SSH Agent Socket to Build Options
2024-03-04 10:54:47 +00:00
Dorian Marié
2bffc3bc74 Replace \service\ by 'service' so it doesn't get executed by bash
Fixes #694
2024-03-01 09:54:06 +01:00
Aleksandr Nigomatulin
064ace0598 Rollback passing invoke_options 2024-02-24 21:36:20 +06:00
Nick Hammond
a02af74dda Add a simple validation to the service name to prevent setup issues 2024-02-22 09:47:48 -07:00
Aleksandr Nigomatulin
5ef384d666 Add test 2024-02-17 00:11:03 +06:00
Aleksandr Nigomatulin
b94dfe193b Remove unnecessary code 2024-02-16 12:52:07 +06:00
Aleksandr Nigomatulin
bc6c027315 Upds according remarks 2024-02-16 11:56:58 +06:00
Krzysztof Adamski
1c2a45817a Supports Passing SSH Args to Build Options 2024-02-15 14:20:20 +01:00
Krzysztof Adamski
b411356409 Allow for Custom Accessory Service Name 2024-02-15 11:12:18 +01:00
Igor Alexandrov
77e72e34ce Bumped default Traefik image to 2.10 2024-02-13 16:00:02 +04:00
Daniel Jackson
ad04bb7556 Show context for lock status message on raise_if_locked 2024-01-23 09:17:15 +01:00
Daniel Jackson
1ec69d3764 Tell user about 'kamal lock help' when deploy fails due to a lock 2024-01-23 09:16:09 +01:00
Daniel Jackson
2d1a0dc9ba Informative message on lock error 2024-01-22 09:11:17 +01:00
Juan Aparicio
c984db152f require missing net/scp dependency 2024-01-11 17:00:13 -03:00
David Heinemeier Hansson
aea55480ad Merge pull request #640 from basecamp/local-different-arch
Allow local builds using a different arch than native
2024-01-10 13:28:37 -08:00
dhh
5a09aa12ba Allow local builds using a different arch than native 2024-01-10 13:00:48 -08:00
Donal McBreen
aca7796e9d Bump version for 1.3.1 2024-01-10 08:56:34 +00:00
Donal McBreen
8b6d8306d1 Merge pull request #637 from basecamp/tests-wait-longer-for-health
Be a bit more patient during tests
2024-01-09 16:45:28 +00:00
Donal McBreen
bb50546467 Merge pull request #636 from basecamp/tests-clean-known-hosts
Fix Net::SSH::HostKeyMismatch between bin/test runs
2024-01-09 16:45:12 +00:00
Donal McBreen
acc6b9ad71 Merge pull request #635 from basecamp/missing-base64-require
Add a missing base64 require
2024-01-09 16:44:42 +00:00
Matthew Kent
9c681d4a38 Be a bit more patient during tests.
Seeing reasonably consistent local failures at 20 seconds.
2024-01-09 08:21:45 -08:00
Matthew Kent
2a8924b53c Address Net::SSH::HostKeyMismatch seen locally between bin/test runs. 2024-01-09 08:21:30 -08:00
Matthew Kent
c5ae54d7d4 Add a missing base64 require.
Also, prepare for the moving of base64 from default to a bundled gem in ruby 3.4.
2024-01-09 08:21:10 -08:00
Donal McBreen
4b05068493 Merge pull request #638 from basecamp/rails-7.2-compatible-rubies
Rails 7.2 compatible Rubies
2024-01-09 12:10:29 +00:00
Donal McBreen
68eb549795 Update to actions/checkout@v4 to silence node warning 2024-01-09 11:35:10 +00:00
Donal McBreen
1a3dd52af4 Rails 7.2 compatible Rubies
1. Add Ruby 2.7 specific Gemfile that uses an older version of nokogiri
2. Rails edge doesn't support Ruby 2.7.0, so exclude it.
3. Add Ruby 3.3
4. Update Gemfile.lock to test against Rails 7.1.2 as it's the latest
   version.
5. Remove continue-on-error from the matrix and always set to true
2024-01-09 11:13:11 +00:00
Ahmed Al Hafoudh
0d709a3fdb Allow lines option to be configured when following app logs 2024-01-08 09:34:38 +01:00
Alexandr Borisov
414d29ae4e Mention Sprockets config in deploy template 2024-01-04 09:18:38 +04:00
Nick Lozon
f8d8319c2f better test description 2023-12-12 15:37:12 -05:00
Nick Lozon
f6a9d54902 unit test 2023-12-12 15:07:29 -05:00
Nick Lozon
b2fd5744fb perform intersection on specified hosts 2023-12-12 14:39:33 -05:00
Donal McBreen
457f06da13 Merge pull request #598 from basecamp/fix-duplicate-role-env-vars
Fix duplicate role env vars
2023-11-29 10:09:34 +00:00
Matthew Kent
7fa53d90bd Merge hashes to de-dupe the app and role envs.
This is better then adding them together which confusingly results in
both ENV vars in the same file, though based on the load order, they
worked anyway.
2023-11-28 15:59:03 -08:00
Donal McBreen
a155b7baab Bump version for 1.3.0 2023-11-28 14:06:45 +00:00
Donal McBreen
175e3bc159 Merge pull request #507 from leonvogt/introduce-absolute-accessories-paths
Add option to set an absolute directory path
2023-11-28 10:15:27 +00:00
Donal McBreen
e3d8a2aa82 Merge pull request #594 from basecamp/match-primary-role-in-filters
Try to match primary_role when roles are filtered
2023-11-28 09:15:39 +00:00
Donal McBreen
0e067fb5e1 Merge pull request #595 from basecamp/error-on-filter-miss
Error out when roles or host filters don't match anything
2023-11-27 08:08:19 +00:00
Matthew Kent
63babecba7 Raise an error when either the filtered hosts or roles are empty.
Keeps us confusingly running things on the primary_host when nothing
matches.
2023-11-25 12:47:39 -08:00
Matthew Kent
79baa598fa Make an effort to match the primary_role from a list of specific roles.
This is less surprising than picking the first role and first host.
2023-11-24 17:41:58 -08:00
Donal McBreen
b1dc188841 Remove stray file 2023-11-23 09:22:36 +00:00
Donal McBreen
635876bdb9 Merge pull request #523 from rmacklin/fix-error-message-in-pre-build-sample-hook
Fix duplicate error message in pre-build.sample
2023-11-16 08:51:22 +00:00
Donal McBreen
11521517fa Merge pull request #550 from dmitrytrager/feature-name-all-for-accessory-reboot
feature: add NAME=all option for accessory reboot
2023-11-16 08:50:51 +00:00
Donal McBreen
610d9de3fd Merge pull request #580 from happyscribe/feat/no-web
Allow Kamal to run without traefik
2023-11-16 08:44:45 +00:00
Yoel Cabo
7472e5dfa6 Merge remote-tracking branch 'origin/main' into feat/no-web 2023-11-14 12:11:18 +01:00
Yoel Cabo
887b7dd46d Do not invoke healthcheck on deploy when no web role 2023-11-14 11:34:32 +01:00
Yoel Cabo
87cb8c1f71 fix: allow configurations without web roles 2023-11-12 09:39:07 +01:00
Leon
f339626667 Add option to set absolute directory path 2023-11-03 22:48:30 +01:00
dmitrytrager
2d22143a24 feature: add NAME=all option for accessory reboot 2023-10-31 00:13:45 +01:00
Aleksandr Nigomatulin
cbd99306eb Add skip_push option to setup 2023-10-30 23:27:58 +06:00
Richard Macklin
f96d071222 Fix copy-pasted error message in pre-build.sample
The "No git remote set" error message was appropriate for the previous
block (where it was presumably copy-pasted from), but in this line we
have failed the check that determines if we have a git branch checked
out, so we should output a corresponding error.
2023-10-08 15:14:40 -07:00
67 changed files with 739 additions and 997 deletions

View File

@@ -1,5 +1,5 @@
name: CI
on:
on:
push:
branches:
- main
@@ -12,17 +12,29 @@ jobs:
- "2.7"
- "3.1"
- "3.2"
- "3.3"
gemfile:
- Gemfile
- gemfiles/ruby_2.7.gemfile
- gemfiles/rails_edge.gemfile
continue-on-error: [false]
exclude:
- ruby-version: "2.7"
gemfile: Gemfile
- ruby-version: "2.7"
gemfile: gemfiles/rails_edge.gemfile
- ruby-version: "3.1"
gemfile: gemfiles/ruby_2.7.gemfile
- ruby-version: "3.2"
gemfile: gemfiles/ruby_2.7.gemfile
- ruby-version: "3.3"
gemfile: gemfiles/ruby_2.7.gemfile
name: ${{ format('Tests (Ruby {0})', matrix.ruby-version) }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue-on-error }}
continue-on-error: true
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1

View File

@@ -1,8 +1,9 @@
PATH
remote: .
specs:
kamal (1.2.0)
kamal (1.4.0)
activesupport (>= 7.0)
base64 (~> 0.2)
bcrypt_pbkdf (~> 1.0)
concurrent-ruby (~> 1.2)
dotenv (~> 2.8)
@@ -15,82 +16,111 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (7.0.4.3)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
base64 (0.2.0)
bcrypt_pbkdf (1.1.0)
bigdecimal (3.1.5)
builder (3.2.4)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
crass (1.0.6)
debug (1.7.2)
irb (>= 1.5.0)
reline (>= 0.3.1)
debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
dotenv (2.8.1)
drb (2.2.0)
ruby2_keywords
ed25519 (1.3.0)
erubi (1.12.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
irb (1.6.3)
reline (>= 0.3.0)
loofah (2.20.0)
io-console (0.7.1)
irb (1.11.0)
rdoc
reline (>= 0.3.8)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (1.0.0)
minitest (5.18.0)
mocha (2.0.2)
nokogiri (>= 1.12.0)
minitest (5.20.0)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
mutex_m (0.2.0)
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-ssh (7.1.0)
nokogiri (1.14.2-arm64-darwin)
net-ssh (7.2.1)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.2-x86_64-darwin)
nokogiri (1.16.0-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.2-x86_64-linux)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
racc (1.6.2)
rack (2.2.6.4)
psych (5.1.2)
stringio
racc (1.7.3)
rack (3.0.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
reline (0.3.3)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.1.0)
rdoc (6.6.2)
psych (>= 4.0.0)
reline (0.4.2)
io-console (~> 0.5)
ruby2_keywords (0.0.5)
sshkit (1.21.4)
sshkit (1.21.7)
mutex_m
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
thor (1.2.1)
stringio (3.1.0)
thor (1.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.7)
webrick (1.8.1)
zeitwerk (2.6.12)
PLATFORMS
arm64-darwin

View File

@@ -0,0 +1,6 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec path: "../"
gem "nokogiri", "~> 1.15.0"

View File

@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "ed25519", "~> 1.2"
spec.add_dependency "bcrypt_pbkdf", "~> 1.0"
spec.add_dependency "concurrent-ruby", "~> 1.2"
spec.add_dependency "base64", "~> 0.2"
spec.add_development_dependency "debug"
spec.add_development_dependency "mocha"

View File

@@ -5,11 +5,11 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
if name == "all"
KAMAL.accessory_names.each { |accessory_name| boot(accessory_name) }
else
with_accessory(name) do |accessory|
with_accessory(name) do |accessory, hosts|
directories(name)
upload(name)
on(accessory.hosts) do
on(hosts) do
execute *KAMAL.registry.login if login
execute *KAMAL.auditor.record("Booted #{name} accessory"), verbosity: :debug
execute *accessory.run
@@ -22,8 +22,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "upload [NAME]", "Upload accessory files to host", hide: true
def upload(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
accessory.files.each do |(local, remote)|
accessory.ensure_local_file_present(local)
@@ -39,8 +39,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "directories [NAME]", "Create accessory directories on host", hide: true
def directories(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
accessory.directories.keys.each do |host_path|
execute *accessory.make_directory(host_path)
end
@@ -49,17 +49,21 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
end
end
desc "reboot [NAME]", "Reboot existing accessory on host (stop container, remove container, start new container)"
desc "reboot [NAME]", "Reboot existing accessory on host (stop container, remove container, start new container; use NAME=all to boot all accessories)"
def reboot(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
execute *KAMAL.registry.login
end
if name == "all"
KAMAL.accessory_names.each { |accessory_name| reboot(accessory_name) }
else
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *KAMAL.registry.login
end
stop(name)
remove_container(name)
boot(name, login: false)
stop(name)
remove_container(name)
boot(name, login: false)
end
end
end
end
@@ -67,8 +71,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "start [NAME]", "Start existing accessory container on host"
def start(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *KAMAL.auditor.record("Started #{name} accessory"), verbosity: :debug
execute *accessory.start
end
@@ -79,8 +83,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "stop [NAME]", "Stop existing accessory container on host"
def stop(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *KAMAL.auditor.record("Stopped #{name} accessory"), verbosity: :debug
execute *accessory.stop, raise_on_non_zero_exit: false
end
@@ -103,8 +107,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
if name == "all"
KAMAL.accessory_names.each { |accessory_name| details(accessory_name) }
else
with_accessory(name) do |accessory|
on(accessory.hosts) { puts capture_with_info(*accessory.info) }
with_accessory(name) do |accessory, hosts|
on(hosts) { puts capture_with_info(*accessory.info) }
end
end
end
@@ -113,7 +117,7 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
option :interactive, aliases: "-i", type: :boolean, default: false, desc: "Execute command over ssh for an interactive shell (use for console/bash)"
option :reuse, type: :boolean, default: false, desc: "Reuse currently running container instead of starting a new one"
def exec(name, cmd)
with_accessory(name) do |accessory|
with_accessory(name) do |accessory, hosts|
case
when options[:interactive] && options[:reuse]
say "Launching interactive command with via SSH from existing container...", :magenta
@@ -125,14 +129,14 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
when options[:reuse]
say "Launching command from existing container...", :magenta
on(accessory.hosts) do
on(hosts) do
execute *KAMAL.auditor.record("Executed cmd '#{cmd}' on #{name} accessory"), verbosity: :debug
capture_with_info(*accessory.execute_in_existing_container(cmd))
end
else
say "Launching command from new container...", :magenta
on(accessory.hosts) do
on(hosts) do
execute *KAMAL.auditor.record("Executed cmd '#{cmd}' on #{name} accessory"), verbosity: :debug
capture_with_info(*accessory.execute_in_new_container(cmd))
end
@@ -146,12 +150,12 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
option :grep, aliases: "-g", desc: "Show lines with grep match only (use this to fetch specific requests by id)"
option :follow, aliases: "-f", desc: "Follow logs on primary server (or specific host set by --hosts)"
def logs(name)
with_accessory(name) do |accessory|
with_accessory(name) do |accessory, hosts|
grep = options[:grep]
if options[:follow]
run_locally do
info "Following logs on #{accessory.hosts}..."
info "Following logs on #{hosts}..."
info accessory.follow_logs(grep: grep)
exec accessory.follow_logs(grep: grep)
end
@@ -159,7 +163,7 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
since = options[:since]
lines = options[:lines].presence || ((since || grep) ? nil : 100) # Default to 100 lines if since or grep isn't set
on(accessory.hosts) do
on(hosts) do
puts capture_with_info(*accessory.logs(since: since, lines: lines, grep: grep))
end
end
@@ -188,8 +192,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "remove_container [NAME]", "Remove accessory container from host", hide: true
def remove_container(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *KAMAL.auditor.record("Remove #{name} accessory container"), verbosity: :debug
execute *accessory.remove_container
end
@@ -200,8 +204,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "remove_image [NAME]", "Remove accessory image from host", hide: true
def remove_image(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *KAMAL.auditor.record("Removed #{name} accessory image"), verbosity: :debug
execute *accessory.remove_image
end
@@ -212,8 +216,8 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
desc "remove_service_directory [NAME]", "Remove accessory directory used for uploaded files and data directories from host", hide: true
def remove_service_directory(name)
mutating do
with_accessory(name) do |accessory|
on(accessory.hosts) do
with_accessory(name) do |accessory, hosts|
on(hosts) do
execute *accessory.remove_service_directory
end
end
@@ -223,7 +227,7 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
private
def with_accessory(name)
if accessory = KAMAL.accessory(name)
yield accessory
yield accessory, accessory_hosts(accessory)
else
error_on_missing_accessory(name)
end
@@ -236,4 +240,12 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
"No accessory by the name of '#{name}'" +
(options ? " (options: #{options.to_sentence})" : "")
end
def accessory_hosts(accessory)
if KAMAL.specific_hosts&.any?
KAMAL.specific_hosts & accessory.hosts
else
accessory.hosts
end
end
end

View File

@@ -13,9 +13,8 @@ class Kamal::Cli::App < Kamal::Cli::Base
KAMAL.roles_on(host).each do |role|
app = KAMAL.app(role: role)
role_config = KAMAL.config.role(role)
if role_config.assets?
if role.assets?
execute *app.extract_assets
old_version = capture_with_info(*app.current_running_version, raise_on_non_zero_exit: false).strip
execute *app.sync_asset_volumes(old_version: old_version)
@@ -27,7 +26,6 @@ class Kamal::Cli::App < Kamal::Cli::Base
KAMAL.roles_on(host).each do |role|
app = KAMAL.app(role: role)
auditor = KAMAL.auditor(role: role)
role_config = KAMAL.config.role(role)
if capture_with_info(*app.container_id_for_version(version), raise_on_non_zero_exit: false).present?
tmp_version = "#{version}_replaced_#{SecureRandom.hex(8)}"
@@ -38,7 +36,7 @@ class Kamal::Cli::App < Kamal::Cli::Base
old_version = capture_with_info(*app.current_running_version, raise_on_non_zero_exit: false).strip
execute *app.tie_cord(role_config.cord_host_file) if role_config.uses_cord?
execute *app.tie_cord(role.cord_host_file) if role.uses_cord?
execute *auditor.record("Booted app version #{version}"), verbosity: :debug
@@ -47,7 +45,7 @@ class Kamal::Cli::App < Kamal::Cli::Base
Kamal::Cli::Healthcheck::Poller.wait_for_healthy(pause_after_ready: true) { capture_with_info(*app.status(version: version)) }
if old_version.present?
if role_config.uses_cord?
if role.uses_cord?
cord = capture_with_info(*app.cord(version: old_version), raise_on_non_zero_exit: false).strip
if cord.present?
execute *app.cut_cord(cord)
@@ -57,7 +55,7 @@ class Kamal::Cli::App < Kamal::Cli::Base
execute *app.stop(version: old_version), raise_on_non_zero_exit: false
execute *app.clean_up_assets if role_config.assets?
execute *app.clean_up_assets if role.assets?
end
end
end
@@ -202,19 +200,20 @@ class Kamal::Cli::App < Kamal::Cli::Base
# FIXME: Catch when app containers aren't running
grep = options[:grep]
since = options[:since]
if options[:follow]
lines = options[:lines].presence || ((since || grep) ? nil : 10) # Default to 10 lines if since or grep isn't set
run_locally do
info "Following logs on #{KAMAL.primary_host}..."
KAMAL.specific_roles ||= ["web"]
role = KAMAL.roles_on(KAMAL.primary_host).first
info KAMAL.app(role: role).follow_logs(host: KAMAL.primary_host, grep: grep)
exec KAMAL.app(role: role).follow_logs(host: KAMAL.primary_host, grep: grep)
info KAMAL.app(role: role).follow_logs(host: KAMAL.primary_host, lines: lines, grep: grep)
exec KAMAL.app(role: role).follow_logs(host: KAMAL.primary_host, lines: lines, grep: grep)
end
else
since = options[:since]
lines = options[:lines].presence || ((since || grep) ? nil : 100) # Default to 100 lines if since or grep isn't set
on(KAMAL.hosts) do |host|

View File

@@ -123,8 +123,9 @@ module Kamal::Cli
yield
rescue SSHKit::Runner::ExecuteError => e
if e.message =~ /cannot create directory/
say "Deploy lock already in place!", :red
on(KAMAL.primary_host) { puts capture_with_debug(*KAMAL.lock.status) }
raise LockError, "Deploy lock found"
raise LockError, "Deploy lock found. Run 'kamal lock help' for more information"
else
raise e
end

View File

@@ -8,9 +8,8 @@ class Kamal::Cli::Env < Kamal::Cli::Base
execute *KAMAL.auditor.record("Pushed env files"), verbosity: :debug
KAMAL.roles_on(host).each do |role|
role_config = KAMAL.config.role(role)
execute *KAMAL.app(role: role).make_env_directory
upload! StringIO.new(role_config.env_file), role_config.host_env_file_path, mode: 400
upload! StringIO.new(role.env_file), role.host_env_file_path, mode: 400
end
end
@@ -36,7 +35,6 @@ class Kamal::Cli::Env < Kamal::Cli::Base
execute *KAMAL.auditor.record("Deleted env files"), verbosity: :debug
KAMAL.roles_on(host).each do |role|
role_config = KAMAL.config.role(role)
execute *KAMAL.app(role: role).remove_env_file
end
end

View File

@@ -3,6 +3,7 @@ class Kamal::Cli::Healthcheck < Kamal::Cli::Base
desc "perform", "Health check current app version"
def perform
raise "The primary host is not configured to run Traefik" unless KAMAL.config.role(KAMAL.config.primary_role).running_traefik?
on(KAMAL.primary_host) do
begin
execute *KAMAL.healthcheck.run

View File

@@ -1,15 +1,18 @@
class Kamal::Cli::Main < Kamal::Cli::Base
desc "setup", "Setup all accessories, push the env, and deploy app to servers"
option :skip_push, aliases: "-P", type: :boolean, default: false, desc: "Skip image build and push"
def setup
print_runtime do
mutating do
invoke_options = deploy_options
say "Ensure Docker is installed...", :magenta
invoke "kamal:cli:server:bootstrap"
invoke "kamal:cli:server:bootstrap", [], invoke_options
say "Push env files...", :magenta
invoke "kamal:cli:env:push"
invoke "kamal:cli:env:push", [], invoke_options
invoke "kamal:cli:accessory:boot", [ "all" ]
invoke "kamal:cli:accessory:boot", [ "all" ], invoke_options
deploy
end
end
@@ -38,8 +41,10 @@ class Kamal::Cli::Main < Kamal::Cli::Base
say "Ensure Traefik is running...", :magenta
invoke "kamal:cli:traefik:boot", [], invoke_options
say "Ensure app can pass healthcheck...", :magenta
invoke "kamal:cli:healthcheck:perform", [], invoke_options
if KAMAL.config.role(KAMAL.config.primary_role).running_traefik?
say "Ensure app can pass healthcheck...", :magenta
invoke "kamal:cli:healthcheck:perform", [], invoke_options
end
say "Detect stale containers...", :magenta
invoke "kamal:cli:app:stale_containers", [], invoke_options.merge(stop: true)

View File

@@ -18,12 +18,16 @@ class Kamal::Cli::Prune < Kamal::Cli::Base
end
end
desc "containers", "Prune all stopped containers, except the last 5"
desc "containers", "Prune all stopped containers, except the last n (default 5)"
option :retain, type: :numeric, default: nil, desc: "Number of containers to retain"
def containers
retain = options.fetch(:retain, KAMAL.config.retain_containers)
raise "retain must be at least 1" if retain < 1
mutating do
on(KAMAL.hosts) do
execute *KAMAL.auditor.record("Pruned containers"), verbosity: :debug
execute *KAMAL.prune.app_containers
execute *KAMAL.prune.app_containers(retain: retain)
execute *KAMAL.prune.healthcheck_containers
end
end

View File

@@ -17,7 +17,9 @@ class Kamal::Cli::Server < Kamal::Cli::Base
end
if missing.any?
raise "Docker is not installed on #{missing.join(", ")} and can't be automatically installed without having root access and the `curl` command available. Install Docker manually: https://docs.docker.com/engine/install/"
raise "Docker is not installed on #{missing.join(", ")} and can't be automatically installed without having root access and either `wget` or `curl`. Install Docker manually: https://docs.docker.com/engine/install/"
end
run_hook "docker-setup"
end
end

View File

@@ -77,6 +77,10 @@ registry:
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
# hitting 404 on in-flight requests. Combines all files from new and old
# version inside the asset_path.
#
# If your app is using the Sprockets gem, ensure it sets `config.assets.manifest`.
# See https://github.com/basecamp/kamal/issues/626 for details
#
# asset_path: /rails/public/assets
# Configure rolling deploys by setting a wait time between batches of restarts.
@@ -84,13 +88,12 @@ registry:
# limit: 10 # Can also specify as a percentage of total hosts, such as "25%"
# wait: 2
# Configure the role used to determine the primary_web_host. This host takes
# Configure the role used to determine the primary_host. This host takes
# deploy locks, runs health checks during the deploy, and follow logs, etc.
# This role should have traefik enabled.
#
# Caution: there's no support for role renaming yet, so be careful to cleanup
# the previous role on the deployed hosts.
# primary_web_role: web
# primary_role: web
# Controls if we abort when see a role with no hosts. Disabling this may be
# useful for more complex deploy configurations.

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env ruby
# A sample docker-setup hook
#
# Sets up a Docker network which can then be used by the applications containers
ssh user@example.com docker network create kamal

View File

@@ -32,7 +32,7 @@ fi
current_branch=$(git branch --show-current)
if [ -z "$current_branch" ]; then
echo "No git remote set, aborting..." >&2
echo "Not on a git branch, aborting..." >&2
exit 1
fi

View File

@@ -20,7 +20,7 @@ class Kamal::Cli::Traefik < Kamal::Cli::Base
on(hosts) do
execute *KAMAL.auditor.record("Rebooted traefik"), verbosity: :debug
execute *KAMAL.registry.login
execute *KAMAL.traefik.stop
execute *KAMAL.traefik.stop, raise_on_non_zero_exit: false
execute *KAMAL.traefik.remove_container
execute *KAMAL.traefik.run
end
@@ -44,7 +44,7 @@ class Kamal::Cli::Traefik < Kamal::Cli::Base
mutating do
on(KAMAL.traefik_hosts) do
execute *KAMAL.auditor.record("Stopped traefik"), verbosity: :debug
execute *KAMAL.traefik.stop
execute *KAMAL.traefik.stop, raise_on_non_zero_exit: false
end
end
end

View File

@@ -24,19 +24,36 @@ class Kamal::Commander
attr_reader :specific_roles, :specific_hosts
def specific_primary!
self.specific_hosts = [ config.primary_web_host ]
self.specific_hosts = [ config.primary_host ]
end
def specific_roles=(role_names)
@specific_roles = Kamal::Utils.filter_specific_items(role_names, config.roles) if role_names.present?
if role_names.present?
@specific_roles = Kamal::Utils.filter_specific_items(role_names, config.roles)
if @specific_roles.empty?
raise ArgumentError, "No --roles match for #{role_names.join(',')}"
end
@specific_roles
end
end
def specific_hosts=(hosts)
@specific_hosts = Kamal::Utils.filter_specific_items(hosts, config.all_hosts) if hosts.present?
if hosts.present?
@specific_hosts = Kamal::Utils.filter_specific_items(hosts, config.all_hosts)
if @specific_hosts.empty?
raise ArgumentError, "No --hosts match for #{hosts.join(',')}"
end
@specific_hosts
end
end
def primary_host
specific_hosts&.first || specific_roles&.first&.primary_host || config.primary_web_host
# Given a list of specific roles, make an effort to match up with the primary_role
specific_hosts&.first || specific_roles&.detect { |role| role == config.primary_role }&.primary_host || specific_roles&.first&.primary_host || config.primary_host
end
def primary_role
@@ -56,7 +73,7 @@ class Kamal::Commander
end
def roles_on(host)
roles.select { |role| role.hosts.include?(host.to_s) }.map(&:name)
roles.select { |role| role.hosts.include?(host.to_s) }
end
def traefik_hosts

View File

@@ -3,12 +3,11 @@ class Kamal::Commands::App < Kamal::Commands::Base
ACTIVE_DOCKER_STATUSES = [ :running, :restarting ]
attr_reader :role, :role_config
attr_reader :role, :role
def initialize(config, role: nil)
super(config)
@role = role
@role_config = config.role(self.role)
end
def run(hostname: nil)
@@ -19,15 +18,15 @@ class Kamal::Commands::App < Kamal::Commands::Base
*(["--hostname", hostname] if hostname),
"-e", "KAMAL_CONTAINER_NAME=\"#{container_name}\"",
"-e", "KAMAL_VERSION=\"#{config.version}\"",
*role_config.env_args,
*role_config.health_check_args,
*config.logging_args,
*role.env_args,
*role.health_check_args,
*role.logging_args,
*config.volume_args,
*role_config.asset_volume_args,
*role_config.label_args,
*role_config.option_args,
*role.asset_volume_args,
*role.label_args,
*role.option_args,
config.absolute_image,
role_config.cmd
role.cmd
end
def start
@@ -64,22 +63,22 @@ class Kamal::Commands::App < Kamal::Commands::Base
def list_versions(*docker_args, statuses: nil)
pipe \
docker(:ps, *filter_args(statuses: statuses), *docker_args, "--format", '"{{.Names}}"'),
%(while read line; do echo ${line##{role_config.container_prefix}-}; done) # Extract SHA from "service-role-dest-SHA"
%(while read line; do echo ${line##{role.container_prefix}-}; done) # Extract SHA from "service-role-dest-SHA"
end
def make_env_directory
make_directory role_config.host_env_directory
make_directory role.host_env_directory
end
def remove_env_file
[ :rm, "-f", role_config.host_env_file_path ]
[ :rm, "-f", role.host_env_file_path ]
end
private
def container_name(version = nil)
[ role_config.container_prefix, version || config.version ].compact.join("-")
[ role.container_prefix, version || config.version ].compact.join("-")
end
def filter_args(statuses: nil)

View File

@@ -1,20 +1,20 @@
module Kamal::Commands::App::Assets
def extract_assets
asset_container = "#{role_config.container_prefix}-assets"
asset_container = "#{role.container_prefix}-assets"
combine \
make_directory(role_config.asset_extracted_path),
make_directory(role.asset_extracted_path),
[*docker(:stop, "-t 1", asset_container, "2> /dev/null"), "|| true"],
docker(:run, "--name", asset_container, "--detach", "--rm", config.latest_image, "sleep 1000000"),
docker(:cp, "-L", "#{asset_container}:#{role_config.asset_path}/.", role_config.asset_extracted_path),
docker(:cp, "-L", "#{asset_container}:#{role.asset_path}/.", role.asset_extracted_path),
docker(:stop, "-t 1", asset_container),
by: "&&"
end
def sync_asset_volumes(old_version: nil)
new_extracted_path, new_volume_path = role_config.asset_extracted_path(config.version), role_config.asset_volume.host_path
new_extracted_path, new_volume_path = role.asset_extracted_path(config.version), role.asset_volume.host_path
if old_version.present?
old_extracted_path, old_volume_path = role_config.asset_extracted_path(old_version), role_config.asset_volume(old_version).host_path
old_extracted_path, old_volume_path = role.asset_extracted_path(old_version), role.asset_volume(old_version).host_path
end
commands = [make_directory(new_volume_path), copy_contents(new_extracted_path, new_volume_path)]
@@ -29,8 +29,8 @@ module Kamal::Commands::App::Assets
def clean_up_assets
chain \
find_and_remove_older_siblings(role_config.asset_extracted_path),
find_and_remove_older_siblings(role_config.asset_volume_path)
find_and_remove_older_siblings(role.asset_extracted_path),
find_and_remove_older_siblings(role.asset_volume_path)
end
private
@@ -39,7 +39,7 @@ module Kamal::Commands::App::Assets
:find,
Pathname.new(path).dirname.to_s,
"-maxdepth 1",
"-name", "'#{role_config.container_prefix}-*'",
"-name", "'#{role.container_prefix}-*'",
"!", "-name", Pathname.new(path).basename.to_s,
"-exec rm -rf \"{}\" +"
]

View File

@@ -2,7 +2,7 @@ module Kamal::Commands::App::Cord
def cord(version:)
pipe \
docker(:inspect, "-f '{{ range .Mounts }}{{printf \"%s %s\\n\" .Source .Destination}}{{ end }}'", container_name(version)),
[:awk, "'$2 == \"#{role_config.cord_volume.container_path}\" {print $1}'"]
[:awk, "'$2 == \"#{role.cord_volume.container_path}\" {print $1}'"]
end
def tie_cord(cord)
@@ -12,8 +12,8 @@ module Kamal::Commands::App::Cord
def cut_cord(cord)
remove_directory(cord)
end
private
private
def create_empty_file(file)
chain \
make_directory_for(file),

View File

@@ -10,9 +10,9 @@ module Kamal::Commands::App::Execution
docker :run,
("-it" if interactive),
"--rm",
*role_config&.env_args,
*role&.env_args,
*config.volume_args,
*role_config&.option_args,
*role&.option_args,
config.absolute_image,
*command
end

View File

@@ -6,11 +6,11 @@ module Kamal::Commands::App::Logging
("grep '#{grep}'" if grep)
end
def follow_logs(host:, grep: nil)
def follow_logs(host:, lines: nil, grep: nil)
run_over_ssh \
pipe(
current_running_container_id,
"xargs docker logs --timestamps --tail 10 --follow 2>&1",
"xargs docker logs --timestamps#{" --tail #{lines}" if lines} --follow 2>&1",
(%(grep "#{grep}") if grep)
),
host: host

View File

@@ -62,10 +62,18 @@ module Kamal::Commands
combine *commands, by: ">"
end
def any(*commands)
combine *commands, by: "||"
end
def xargs(command)
[ :xargs, command ].flatten
end
def shell(command)
[ :sh, "-c", "'#{command.flatten.join(" ").gsub("'", "'\\''")}'" ]
end
def docker(*args)
args.compact.unshift :docker
end

View File

@@ -3,7 +3,7 @@ class Kamal::Commands::Builder::Base < Kamal::Commands::Base
class BuilderError < StandardError; end
delegate :argumentize, to: Kamal::Utils
delegate :args, :secrets, :dockerfile, :local_arch, :local_host, :remote_arch, :remote_host, :cache_from, :cache_to, to: :builder_config
delegate :args, :secrets, :dockerfile, :local_arch, :local_host, :remote_arch, :remote_host, :cache_from, :cache_to, :ssh, to: :builder_config
def clean
docker :image, :rm, "--force", config.absolute_image
@@ -14,7 +14,7 @@ class Kamal::Commands::Builder::Base < Kamal::Commands::Base
end
def build_options
[ *build_tags, *build_cache, *build_labels, *build_args, *build_secrets, *build_dockerfile ]
[ *build_tags, *build_cache, *build_labels, *build_args, *build_secrets, *build_dockerfile, *build_ssh ]
end
def build_context
@@ -24,7 +24,10 @@ class Kamal::Commands::Builder::Base < Kamal::Commands::Base
def validate_image
pipe \
docker(:inspect, "-f", "'{{ .Config.Labels.service }}'", config.absolute_image),
[:grep, "-x", config.service, "||", "(echo \"Image #{config.absolute_image} is missing the `service` label\" && exit 1)"]
any(
[:grep, "-x", config.service],
"(echo \"Image #{config.absolute_image} is missing the 'service' label\" && exit 1)"
)
end
@@ -60,6 +63,10 @@ class Kamal::Commands::Builder::Base < Kamal::Commands::Base
end
end
def build_ssh
argumentize "--ssh", ssh if ssh.present?
end
def builder_config
config.builder
end

View File

@@ -10,7 +10,7 @@ class Kamal::Commands::Builder::Multiarch < Kamal::Commands::Builder::Base
def push
docker :buildx, :build,
"--push",
"--platform", "linux/amd64,linux/arm64",
"--platform", platform_names,
"--builder", builder_name,
*build_options,
build_context
@@ -26,4 +26,12 @@ class Kamal::Commands::Builder::Multiarch < Kamal::Commands::Builder::Base
def builder_name
"kamal-#{config.service}-multiarch"
end
def platform_names
if local_arch
"linux/#{local_arch}"
else
"linux/amd64,linux/arm64"
end
end
end

View File

@@ -1,7 +1,7 @@
class Kamal::Commands::Docker < Kamal::Commands::Base
# Install Docker using the https://github.com/docker/docker-install convenience script.
def install
pipe [ :curl, "-fsSL", "https://get.docker.com" ], :sh
pipe get_docker, :sh
end
# Checks the Docker client version. Fails if Docker is not installed.
@@ -18,4 +18,13 @@ class Kamal::Commands::Docker < Kamal::Commands::Base
def superuser?
[ '[ "${EUID:-$(id -u)}" -eq 0 ] || command -v sudo >/dev/null || command -v su >/dev/null' ]
end
private
def get_docker
shell \
any \
[ :curl, "-fsSL", "https://get.docker.com" ],
[ :wget, "-O -", "https://get.docker.com" ],
[ :echo, "\"exit 1\"" ]
end
end

View File

@@ -1,7 +1,7 @@
class Kamal::Commands::Healthcheck < Kamal::Commands::Base
def run
web = config.role(config.primary_web_role)
primary = config.role(config.primary_role)
docker :run,
"--detach",
@@ -9,12 +9,12 @@ class Kamal::Commands::Healthcheck < Kamal::Commands::Base
"--publish", "#{exposed_port}:#{config.healthcheck["port"]}",
"--label", "service=#{config.healthcheck_service}",
"-e", "KAMAL_CONTAINER_NAME=\"#{config.healthcheck_service}\"",
*web.env_args,
*web.health_check_args(cord: false),
*primary.env_args,
*primary.health_check_args(cord: false),
*config.volume_args,
*web.option_args,
*primary.option_args,
config.absolute_image,
web.cmd
primary.cmd
end
def status

View File

@@ -1,5 +1,6 @@
require "active_support/duration"
require "time"
require "base64"
class Kamal::Commands::Lock < Kamal::Commands::Base
def acquire(message, version)

View File

@@ -13,10 +13,10 @@ class Kamal::Commands::Prune < Kamal::Commands::Base
"while read image tag; do docker rmi $tag; done"
end
def app_containers(keep_last: 5)
def app_containers(retain:)
pipe \
docker(:ps, "-q", "-a", *service_filter, *stopped_containers_filters),
"tail -n +#{keep_last + 1}",
"tail -n +#{retain + 1}",
"while read container_id; do docker rm $container_id; done"
end

View File

@@ -2,7 +2,10 @@ class Kamal::Commands::Registry < Kamal::Commands::Base
delegate :registry, to: :config
def login
docker :login, registry["server"], "-u", sensitive(lookup("username")), "-p", sensitive(lookup("password"))
docker :login,
registry["server"],
"-u", sensitive(Kamal::Utils.escape_shell_value(lookup("username"))),
"-p", sensitive(Kamal::Utils.escape_shell_value(lookup("password")))
end
def logout

View File

@@ -1,7 +1,7 @@
class Kamal::Commands::Traefik < Kamal::Commands::Base
delegate :argumentize, :optionize, to: Kamal::Utils
DEFAULT_IMAGE = "traefik:v2.9"
DEFAULT_IMAGE = "traefik:v2.10"
CONTAINER_PORT = 80
DEFAULT_ARGS = {
'log.level' => 'DEBUG'
@@ -39,7 +39,7 @@ class Kamal::Commands::Traefik < Kamal::Commands::Base
end
def start_or_run
combine start, run, by: "||"
any start, run
end
def info

View File

@@ -6,7 +6,7 @@ require "erb"
require "net/ssh/proxy/jump"
class Kamal::Configuration
delegate :service, :image, :servers, :env, :labels, :registry, :stop_wait_time, :hooks_path, to: :raw_config, allow_nil: true
delegate :service, :image, :servers, :env, :labels, :registry, :stop_wait_time, :hooks_path, :logging, to: :raw_config, allow_nil: true
delegate :argumentize, :optionize, to: Kamal::Utils
attr_reader :destination, :raw_config
@@ -91,8 +91,20 @@ class Kamal::Configuration
roles.flat_map(&:hosts).uniq
end
def primary_web_host
role(primary_web_role)&.primary_host
def primary_host
primary_role&.primary_host
end
def primary_role_name
raw_config.primary_role || "web"
end
def primary_role
role(primary_role_name)
end
def allow_empty_roles?
raw_config.allow_empty_roles
end
def traefik_roles
@@ -127,6 +139,10 @@ class Kamal::Configuration
raw_config.require_destination
end
def retain_containers
raw_config.retain_containers || 5
end
def volume_args
if raw_config.volumes.present?
@@ -137,9 +153,9 @@ class Kamal::Configuration
end
def logging_args
if raw_config.logging.present?
optionize({ "log-driver" => raw_config.logging["driver"] }.compact) +
argumentize("--log-opt", raw_config.logging["options"])
if logging.present?
optionize({ "log-driver" => logging["driver"] }.compact) +
argumentize("--log-opt", logging["options"])
else
argumentize("--log-opt", { "max-size" => "10m" })
end
@@ -208,24 +224,16 @@ class Kamal::Configuration
raw_config.asset_path
end
def primary_web_role
raw_config.primary_web_role || "web"
end
def allow_empty_roles?
raw_config.allow_empty_roles
end
def valid?
ensure_destination_if_required && ensure_required_keys_present && ensure_valid_kamal_version
ensure_destination_if_required && ensure_required_keys_present && ensure_valid_kamal_version && ensure_retain_containers_valid && ensure_valid_service_name
end
def to_h
{
roles: role_names,
hosts: all_hosts,
primary_host: primary_web_host,
primary_host: primary_host,
version: version,
repository: repository,
absolute_image: absolute_image,
@@ -264,16 +272,12 @@ class Kamal::Configuration
raise ArgumentError, "You must specify a password for the registry in config/deploy.yml (or set the ENV variable if that's used)"
end
unless role_names.include?(primary_web_role)
raise ArgumentError, "The primary_web_role #{primary_web_role} isn't defined"
unless role_names.include?(primary_role_name)
raise ArgumentError, "The primary_role #{primary_role_name} isn't defined"
end
unless traefik_role_names.include?(primary_web_role)
raise ArgumentError, "Role #{primary_web_role} needs to have traefik enabled"
end
if role(primary_web_role).hosts.empty?
raise ArgumentError, "No servers specified for the #{primary_web_role} primary_web_role"
if primary_role.hosts.empty?
raise ArgumentError, "No servers specified for the #{primary_role.name} primary_role"
end
unless allow_empty_roles?
@@ -287,6 +291,12 @@ class Kamal::Configuration
true
end
def ensure_valid_service_name
raise ArgumentError, "Service name can only include alphanumeric characters, hyphens, and underscores" unless raw_config[:service] =~ /^[a-z0-9_-]+$/
true
end
def ensure_valid_kamal_version
if minimum_version && Gem::Version.new(minimum_version) > Gem::Version.new(Kamal::VERSION)
raise ArgumentError, "Current version is #{Kamal::VERSION}, minimum required is #{minimum_version}"
@@ -295,6 +305,12 @@ class Kamal::Configuration
true
end
def ensure_retain_containers_valid
raise ArgumentError, "Must retain at least 1 container" if retain_containers < 1
true
end
def role_names
raw_config.servers.is_a?(Array) ? [ "web" ] : raw_config.servers.keys.sort

View File

@@ -8,7 +8,7 @@ class Kamal::Configuration::Accessory
end
def service_name
"#{config.service}-#{name}"
specifics["service"] || "#{config.service}-#{name}"
end
def image
@@ -70,8 +70,8 @@ class Kamal::Configuration::Accessory
def directories
specifics["directories"]&.to_h do |host_to_container_mapping|
host_relative_path, container_path = host_to_container_mapping.split(":")
[ expand_host_path(host_relative_path), container_path ]
host_path, container_path = host_to_container_mapping.split(":")
[ expand_host_path(host_path), container_path ]
end || {}
end
@@ -138,13 +138,17 @@ class Kamal::Configuration::Accessory
def remote_directories_as_volumes
specifics["directories"]&.collect do |host_to_container_mapping|
host_relative_path, container_path = host_to_container_mapping.split(":")
[ expand_host_path(host_relative_path), container_path ].join(":")
host_path, container_path = host_to_container_mapping.split(":")
[ expand_host_path(host_path), container_path ].join(":")
end || []
end
def expand_host_path(host_relative_path)
"#{service_data_directory}/#{host_relative_path}"
def expand_host_path(host_path)
absolute_path?(host_path) ? host_path : "#{service_data_directory}/#{host_path}"
end
def absolute_path?(path)
Pathname.new(path).absolute?
end
def service_data_directory

View File

@@ -8,7 +8,7 @@ class Kamal::Configuration::Boot
limit = @options["limit"]
if limit.to_s.end_with?("%")
@host_count * limit.to_i / 100
[@host_count * limit.to_i / 100, 1].max
else
limit
end

View File

@@ -81,6 +81,10 @@ class Kamal::Configuration::Builder
end
end
def ssh
@options["ssh"]
end
private
def valid?
if @options["cache"] && @options["cache"]["type"]

View File

@@ -3,9 +3,10 @@ class Kamal::Configuration::Role
delegate :argumentize, :optionize, to: Kamal::Utils
attr_accessor :name
alias to_s name
def initialize(name, config:)
@name, @config = name.inquiry, config
@name, @config = name.inquiry, config
end
def primary_host
@@ -36,6 +37,18 @@ class Kamal::Configuration::Role
argumentize "--label", labels
end
def logging_args
args = config.logging || {}
args.deep_merge!(specializations["logging"]) if specializations["logging"].present?
if args.any?
optionize({ "log-driver" => args["driver"] }.compact) +
argumentize("--log-opt", args["options"])
else
config.logging_args
end
end
def env
if config.env && config.env["secret"]
@@ -93,7 +106,15 @@ class Kamal::Configuration::Role
def running_traefik?
name.web? || specializations["traefik"]
if specializations["traefik"].nil?
primary?
else
specializations["traefik"]
end
end
def primary?
self == @config.primary_role
end
@@ -231,7 +252,7 @@ class Kamal::Configuration::Role
clear_app_env = config.env["secret"] ? Array(config.env["clear"]) : Array(config.env["clear"] || config.env)
clear_role_env = specialized_env["secret"] ? Array(specialized_env["clear"]) : Array(specialized_env["clear"] || specialized_env)
new_env["clear"] = (clear_app_env + clear_role_env).uniq
new_env["clear"] = clear_app_env.to_h.merge(clear_role_env.to_h)
end
end

View File

@@ -1,5 +1,6 @@
require "sshkit"
require "sshkit/dsl"
require "net/scp"
require "active_support/core_ext/hash/deep_merge"
require "json"

View File

@@ -1,3 +1,3 @@
module Kamal
VERSION = "1.2.0"
VERSION = "1.4.0"
end

747
queries
View File

@@ -1,747 +0,0 @@
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 59025) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 59025 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119381456 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 59025) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 59025 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119381456 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 32020052 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 32020052 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 32020052 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31865394 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31865394 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31865394 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-05-24 13:51:14' AND `postings`.`id` < 573587552 OR `postings`.`active_at` < '2023-05-24 13:51:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118823782 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118823782 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43054800 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43054800 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43054800 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10606498 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10606498 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10606498 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10848889 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10848889 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 118897) AND `postings`.`user_id` = 119003 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10848889 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-09 14:32:14' AND `postings`.`id` < 649775156 OR `postings`.`active_at` < '2023-10-09 14:32:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 17:44:13' AND `postings`.`id` < 657298529 OR `postings`.`active_at` < '2023-10-23 17:44:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 370688) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 370688 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41893190 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 370688) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 370688 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41893190 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 370688) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 370688 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41893190 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-05-24 13:51:14' AND `postings`.`id` < 573587552 OR `postings`.`active_at` < '2023-05-24 13:51:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-05-24 13:51:14' AND `postings`.`id` < 573587552 OR `postings`.`active_at` < '2023-05-24 13:51:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 39582006 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-05 15:21:00' AND `postings`.`id` < 647893980 OR `postings`.`active_at` < '2023-10-05 15:21:00') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-05 15:21:00' AND `postings`.`id` < 647893980 OR `postings`.`active_at` < '2023-10-05 15:21:00') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-09 14:32:14' AND `postings`.`id` < 649775156 OR `postings`.`active_at` < '2023-10-09 14:32:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-09 14:32:14' AND `postings`.`id` < 649775156 OR `postings`.`active_at` < '2023-10-09 14:32:14') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 84297) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 84297 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (2642394, 35010213) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 84297) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 84297 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (2642394, 35010213) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 84297) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 84297 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (2642394, 35010213) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 17:44:13' AND `postings`.`id` < 657298529 OR `postings`.`active_at` < '2023-10-23 17:44:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 17:44:13' AND `postings`.`id` < 657298529 OR `postings`.`active_at` < '2023-10-23 17:44:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 06:39:33' AND `postings`.`id` < 656985167 OR `postings`.`active_at` < '2023-10-23 06:39:33') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 485652) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 485652 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87516401 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 7721) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 7721 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115911671 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 7721) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 7721 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115911671 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119110998 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119110998 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-28 22:12:35' AND `postings`.`id` < 660131690 OR `postings`.`active_at` < '2023-10-28 22:12:35') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-28 22:12:35' AND `postings`.`id` < 660131690 OR `postings`.`active_at` < '2023-10-28 22:12:35') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 588826) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 588826 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93003659 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 5426797 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 5426797 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 676435) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 676435 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119502850 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 676435) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 676435 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119502850 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 408705) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 408705 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51574069 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 408705) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 408705 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51574069 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 408705) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 408705 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51574069 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 9102198 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 9102198 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 9102198 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10309490 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 10309490 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2924436 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2924436 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2924436 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51849337 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51849337 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 51849337 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 394713 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 394713 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 394713 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 14499825 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 14499825 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 14499825 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-07 19:26:21' AND `postings`.`id` < 616917013 OR `postings`.`active_at` < '2023-08-07 19:26:21') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-07 19:26:21' AND `postings`.`id` < 616917013 OR `postings`.`active_at` < '2023-08-07 19:26:21') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 326042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 326042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 103260200 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 326042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 326042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 103260200 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 326042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 326042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 103260200 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56535) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56535 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 23772297 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119110998 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 151981) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 151981 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119110998 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-09-13 18:34:50' AND `postings`.`id` < 636001768 OR `postings`.`active_at` < '2023-09-13 18:34:50') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-09-13 18:34:50' AND `postings`.`id` < 636001768 OR `postings`.`active_at` < '2023-09-13 18:34:50') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 109157576 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13611555 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 47631839 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 47631839 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 47631839 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403429) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403429 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93300194 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403429) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403429 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93300194 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403429) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403429 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93300194 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 43209843 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84272411 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 72157418 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106168454 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106168454 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106168454 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69863) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69863 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95669098 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 106701) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 106701 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (80724859, 81734592, 94302743, 97557423, 111322424, 115829014, 118870881, 119410658, 119615407) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 106701) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 106701 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (80724859, 81734592, 94302743, 97557423, 111322424, 115829014, 118870881, 119410658, 119615407) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 106701) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 106701 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (80724859, 81734592, 94302743, 97557423, 111322424, 115829014, 118870881, 119410658, 119615407) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18388225 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18388225 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18388225 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33385164 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33385164 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36891) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36891 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33385164 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 632073) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 632073 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119733421 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 632073) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 632073 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119733421 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26619991 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26619991 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 36889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 36889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26619991 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308626) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308626 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56825807 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 38036607 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 342492) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 342492 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 38036607 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 62886) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 62886 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119203199 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8632) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8632 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 5390784 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8632) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8632 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 5390784 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8632) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8632 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 5390784 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190507) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190507 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 37709374 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190507) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190507 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 37709374 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-27 15:05:17' AND `postings`.`id` < 659627569 OR `postings`.`active_at` < '2023-10-27 15:05:17') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-27 15:05:17' AND `postings`.`id` < 659627569 OR `postings`.`active_at` < '2023-10-27 15:05:17') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-30 19:21:53' AND `postings`.`id` < 661074897 OR `postings`.`active_at` < '2023-10-30 19:21:53') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-30 19:21:53' AND `postings`.`id` < 661074897 OR `postings`.`active_at` < '2023-10-30 19:21:53') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9440) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9440 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 100252298 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9440) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9440 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 100252298 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 279617) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 279617 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 26321209 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9440) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9440 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 100252298 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9440) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9440 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 100252298 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 26889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 26889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46998542 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 26889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 26889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46998542 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 26889) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 26889 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46998542 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 413538) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 413538 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77866350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 25064) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 25064 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118023856 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 268321) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 268321 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21335768 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 268321) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 268321 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21335768 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 268321) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 268321 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21335768 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 22079) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 22079 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17884675 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 22079) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 22079 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17884675 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 22079) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 22079 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17884675 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19615) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19615 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21386410 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19615) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19615 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21386410 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 27503) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 27503 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 67848026 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120383718 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120383718 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 06:39:33' AND `postings`.`id` < 656985167 OR `postings`.`active_at` < '2023-10-23 06:39:33') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 06:39:33' AND `postings`.`id` < 656985167 OR `postings`.`active_at` < '2023-10-23 06:39:33') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 543042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 543042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84590992 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 543042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 543042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84590992 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 209325) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 209325 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17245819 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 209325) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 209325 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17245819 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 209325) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 209325 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 17245819 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 06:39:33' AND `postings`.`id` < 656985167 OR `postings`.`active_at` < '2023-10-23 06:39:33') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-23 06:39:33' AND `postings`.`id` < 656985167 OR `postings`.`active_at` < '2023-10-23 06:39:33') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 543042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 543042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84590992 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 543042) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 543042 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84590992 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 519925) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 519925 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118399008 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 631979) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 631979 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120388665 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93830993 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93830993 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93830993 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 401271) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 401271 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87719645 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 401271) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 401271 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87719645 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 401271) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 401271 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87719645 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 73334804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 73334804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 486976) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 486976 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 73334804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115635818 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115635818 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115635818 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115635818 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13785428 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13785428 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 190828) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 190828 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 13785428 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 284809) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 284809 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116105212 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 284809) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 284809 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116105212 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88986) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88986 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 3393193 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88986) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88986 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 3393193 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88986) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88986 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 3393193 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-02 09:08:54' AND `postings`.`id` < 642510482 OR `postings`.`active_at` < '2023-10-02 09:08:54') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-02 09:08:54' AND `postings`.`id` < 642510482 OR `postings`.`active_at` < '2023-10-02 09:08:54') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-10 10:45:41' AND `postings`.`id` < 650194493 OR `postings`.`active_at` < '2023-10-10 10:45:41') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-10 10:45:41' AND `postings`.`id` < 650194493 OR `postings`.`active_at` < '2023-10-10 10:45:41') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 500714) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 500714 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 78073547 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 57908443 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 57908443 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 57908443 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84723901 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84723901 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 431096) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 431096 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84723901 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 661423) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 661423 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115482286 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 77353) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 77353 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116819688 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 77353) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 77353 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116819688 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28767291 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28767291 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28767291 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28027463 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28027463 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286824) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286824 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 28027463 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (63127457, 88060240, 50) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (63127457, 88060240, 50) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (63127457, 88060240, 50) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (71966584, 51) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (71966584, 51) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (71966584, 51) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (76468147, 748) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (76468147, 748) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 459296) AND `postings`.`user_id` = 458356 AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (76468147, 748) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21087782 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21087782 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21087782 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2621824 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18338647 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18338647 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48515) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48515 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 18338647 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 475736) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 475736 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118961176 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 475736) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 475736 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118961176 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403760) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403760 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (84013362, 75976220, 75975710, 83747783) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403760) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403760 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (84013362, 75976220, 75975710, 83747783) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 403760) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 403760 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (84013362, 75976220, 75975710, 83747783) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 294130) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 294130 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 37679350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 294130) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 294130 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 37679350 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 294130) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 294130 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 37679350 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 56647) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 56647 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8864240 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 663878) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 663878 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 114701678 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 663878) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 663878 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 114701678 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 308553) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 308553 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND 1=0 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88298) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88298 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 48317212 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88298) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88298 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 48317212 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 88298) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 88298 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 48317212 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 7721) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 7721 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119487362 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 7721) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 7721 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119487362 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 107220850 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 107220850 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 107220850 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106743343 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106743343 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 643630) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 643630 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 106743343 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 414461) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 414461 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116346748 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115457451 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119426681 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118984666 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 673234) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 673234 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 115597101 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 657631) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 657631 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119341168 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 657631) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 657631 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119341168 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 676435) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 676435 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119934130 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 676435) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 676435 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 119934130 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 96429) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 96429 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120249415 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 96429) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 96429 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120249415 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 33913) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 33913 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120327835 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 33913) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 33913 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120327835 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 71422751 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 71422751 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 71422751 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41598746 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41598746 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 41598746 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12263655 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12263655 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 160530) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 160530 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12263655 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 690327) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 690327 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120224951 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 690327) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 690327 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120224951 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 514673) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 514673 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116647878 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 514673) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 514673 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116647878 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 514673) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 514673 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116647878 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 411111) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 411111 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120277784 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 411111) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 411111 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120277784 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 690327) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 690327 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120224951 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 690327) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 690327 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120224951 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286561) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286561 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95747205 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286561) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286561 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95747205 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 286561) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 286561 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 95747205 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 4579632 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 4579632 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 4579632 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT `identity_preferences`.* FROM `identity_preferences` WHERE `identity_preferences`.`identity_id` = 22079 LIMIT 1\n Rendered layout layouts/application.html.erb (Duration: 1895.0ms | Allocations: 1056924)\nCompleted 200 OK in 1967ms (Views: 1110.9ms | ActiveRecord: 841.5ms | Elasticsearch: 0.0ms | Allocations: 1075172)\n""}"
SELECT COUNT(*) AS `size`, MAX(`entries`.`updated_at`) AS timestamp FROM `entries` WHERE `entries`.`creator_id` IN (SELECT `contacts`.`id` FROM `contacts` INNER JOIN `users` ON `contacts`.`contactable_id` = `users`.`id` WHERE `users`.`identity_id` = 203632 AND `contacts`.`contactable_type` = 'User') AND `entries`.`entryable_type` = 'Message' AND `entries`.`status` = 0 AND 1=0\n Rendering entries/parkings/index.html.erb\n Rendered collection of entries/parkings/_entry.html.erb [0 times] (Duration: 0.1ms | Allocations: 25)\n Rendered entries/parkings/index.html.erb (Duration: 0.4ms | Allocations: 265)\nCompleted 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 4.0ms | Elasticsearch: 0.0ms | Allocations: 12790)\n""}"
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2580907 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2580907 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 2580907 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 88784319 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 95489) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 95489 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87246737 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93204111 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67641) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67641 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 12881316 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 113027709 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 113027709 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-10-31 17:26:16' AND `postings`.`id` < 466687817 OR `postings`.`active_at` < '2022-10-31 17:26:16') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 270534) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 270534 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 21308352 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 113027709 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 113027709 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-18 18:55:06' AND `postings`.`id` < 622717707 OR `postings`.`active_at` < '2023-08-18 18:55:06') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-18 18:55:06' AND `postings`.`id` < 622717707 OR `postings`.`active_at` < '2023-08-18 18:55:06') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-11-10 00:07:28' AND `postings`.`id` < 472056798 OR `postings`.`active_at` < '2022-11-10 00:07:28') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 77638) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 77638 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (2221312, 2224852, 2225040, 119468319) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 77638) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 77638 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (2221312, 2224852, 2225040, 119468319) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 11592) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 11592 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 365459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 11592) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 11592 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 365459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 11592) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 11592 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 365459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 108401025 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 108401025 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-10-31 17:26:16' AND `postings`.`id` < 466687817 OR `postings`.`active_at` < '2022-10-31 17:26:16') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 108401025 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 108401025 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-11-10 00:07:28' AND `postings`.`id` < 472056798 OR `postings`.`active_at` < '2022-11-10 00:07:28') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 10039) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 10039 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 399173 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 10039) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 10039 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 399173 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 10039) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 10039 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 399173 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-18 18:55:06' AND `postings`.`id` < 622717707 OR `postings`.`active_at` < '2023-08-18 18:55:06') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-08-18 18:55:06' AND `postings`.`id` < 622717707 OR `postings`.`active_at` < '2023-08-18 18:55:06') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-07-26 03:45:11' AND `postings`.`id` < 610464423 OR `postings`.`active_at` < '2023-07-26 03:45:11') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-07-26 03:45:11' AND `postings`.`id` < 610464423 OR `postings`.`active_at` < '2023-07-26 03:45:11') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 513296) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 513296 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80404804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 30019) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 30019 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80775358 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 30019) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 30019 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 80775358 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (108401025, 113027709) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (108401025, 113027709) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (108401025, 113027709) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 322757) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 322757 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (108401025, 113027709) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-03-31 18:52:09' AND `postings`.`id` < 549177991 OR `postings`.`active_at` < '2023-03-31 18:52:09') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-03-31 18:52:09' AND `postings`.`id` < 549177991 OR `postings`.`active_at` < '2023-03-31 18:52:09') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-17 12:30:13' AND `postings`.`id` < 654014918 OR `postings`.`active_at` < '2023-10-17 12:30:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-11-10 00:07:28' AND `postings`.`id` < 472056798 OR `postings`.`active_at` < '2022-11-10 00:07:28') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-26 09:03:32' AND `postings`.`id` < 658804438 OR `postings`.`active_at` < '2023-10-26 09:03:32') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 8196) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 8196 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 33965695 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-07-26 03:45:11' AND `postings`.`id` < 610464423 OR `postings`.`active_at` < '2023-07-26 03:45:11') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-04-12 14:27:45' AND `postings`.`id` < 550423716 OR `postings`.`active_at` < '2023-04-12 14:27:45') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-04-12 14:27:45' AND `postings`.`id` < 550423716 OR `postings`.`active_at` < '2023-04-12 14:27:45') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48020) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48020 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118584876 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 48020) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 48020 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 118584876 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 67358) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 67358 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93216905 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 133186) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 133186 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (67369403, 118264785, 67369387) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 305654) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 305654 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 29720558 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-09-20 18:11:45' AND `postings`.`id` < 639258582 OR `postings`.`active_at` < '2023-09-20 18:11:45') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 305654) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 305654 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 29720558 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 558416) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 558416 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 85043979 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 558416) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 558416 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 85043979 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45285) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45285 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 40616474 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45285) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45285 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 40616474 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45285) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45285 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 40616474 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 558416) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 558416 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 85043979 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 558416) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 558416 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 85043979 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54990502 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54990502 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 72859) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 72859 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 111732103 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 72859) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 72859 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 111732103 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 72859) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 72859 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 111732103 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 102635078 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 102635078 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-17 12:30:13' AND `postings`.`id` < 654014918 OR `postings`.`active_at` < '2023-10-17 12:30:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-17 12:30:13' AND `postings`.`id` < 654014918 OR `postings`.`active_at` < '2023-10-17 12:30:13') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 333292) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 333292 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46308241 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 333292) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 333292 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46308241 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 333292) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 333292 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 46308241 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-26 09:03:32' AND `postings`.`id` < 658804438 OR `postings`.`active_at` < '2023-10-26 09:03:32') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-10-26 09:03:32' AND `postings`.`id` < 658804438 OR `postings`.`active_at` < '2023-10-26 09:03:32') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 167905) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 167905 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8607731 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 94239406 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 94239406 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 320314) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 320314 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 82279752 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 320314) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 320314 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 82279752 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19888) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19888 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 75837332 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19888) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19888 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 75837332 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19888) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19888 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 75837332 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 105027462 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 105027462 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 35333119 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 35333119 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 35333119 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27007264 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27007264 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 49797) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 49797 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27007264 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 318746) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 318746 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116124298 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 318746) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 318746 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116124298 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2022-11-10 00:07:28' AND `postings`.`id` < 472056798 OR `postings`.`active_at` < '2022-11-10 00:07:28') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-07-26 03:45:11' AND `postings`.`id` < 610464423 OR `postings`.`active_at` < '2023-07-26 03:45:11') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-07-26 03:45:11' AND `postings`.`id` < 610464423 OR `postings`.`active_at` < '2023-07-26 03:45:11') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 75169) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 75169 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87833811 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 75169) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 75169 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 87833811 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 9170) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 9170 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 54927836 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 318209) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 318209 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49958476 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 318209) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 318209 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49958476 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 318209) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 318209 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49958476 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 23672) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 23672 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 44911204 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 23672) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 23672 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 44911204 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 23672) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 23672 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 44911204 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 672676) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 672676 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (115096173, 115427375, 115775591, 115791585, 115791593, 116663672, 117279853, 118899166, 119731016) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 672676) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 672676 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (115096173, 115427375, 115775591, 115791585, 115791593, 116663672, 117279853, 118899166, 119731016) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 672676) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 672676 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (115096173, 115427375, 115775591, 115791585, 115791593, 116663672, 117279853, 118899166, 119731016) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 92387320 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 92387320 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 192753) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 192753 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (102862475, 119182090, 119261784) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 311341) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 311341 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 52220444 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 311341) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 311341 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 52220444 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 311341) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 311341 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 52220444 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 672676) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 672676 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116663672 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 672676) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 672676 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 116663672 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 69058) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 69058 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 56827804 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45190) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45190 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49901403 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45190) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45190 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49901403 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 45190) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 45190 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 49901403 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 158400) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 158400 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8503517 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 158400) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 158400 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8503517 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 158400) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 158400 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 8503517 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 340388) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 340388 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84884082 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 340388) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 340388 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84884082 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 340388) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 340388 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84884082 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 46762) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 46762 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 83496578 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 46762) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 46762 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 83496578 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 46762) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 46762 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 83496578 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 97221849 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 18315) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 18315 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 97221849 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 298555) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 298555 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31375690 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 298555) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 298555 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31375690 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 298555) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 298555 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31375690 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 312171) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 312171 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 30935070 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 312171) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 312171 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 30935070 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 312171) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 312171 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 30935070 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-11-02 15:42:43' AND `postings`.`id` < 662848763 OR `postings`.`active_at` < '2023-11-02 15:42:43') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-11-02 15:42:43' AND `postings`.`id` < 662848763 OR `postings`.`active_at` < '2023-11-02 15:42:43') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-11-03 10:24:47' AND `postings`.`id` < 663299036 OR `postings`.`active_at` < '2023-11-03 10:24:47') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) AND (`postings`.`active_at` = '2023-11-03 10:24:47' AND `postings`.`id` < 663299036 OR `postings`.`active_at` < '2023-11-03 10:24:47') ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 165928) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 165928 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (118569344, 119439752) AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 30
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 165928) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 165928 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` IN (118569344, 119439752) AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 667222) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 667222 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 112616375 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 329690) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 329690 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 36108177 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 329690) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 329690 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 36108177 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 329690) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 329690 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 36108177 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 4810) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 4810 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 77760390 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 69763506 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31460528 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31460528 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19786) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19786 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 31460528 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19537) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19537 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 746852 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19537) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19537 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 746852 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 19537) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 19537 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 746852 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 5455) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 5455 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120333380 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 5455) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 5455 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120333380 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 21419) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 21419 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 120401674 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 93425459 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 83942) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 83942 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 58684430 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 83942) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 83942 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 58684430 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 83942) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 83942 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 58684430 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27532828 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27532828 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 27532828 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84954100 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10
SELECT COUNT(DISTINCT `postings`.`id`) FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84954100 AND (`users`.`account_id` = `involvements`.`account_id`)
SELECT DISTINCT `postings`.`id`, `postings`.`active_at` FROM `postings` USE INDEX (index_postings_on_user_id_and_postable_and_active_at) STRAIGHT_JOIN `involvements` USE INDEX(index_involvements_on_account_id_and_topic_id_and_contact_id) ON `involvements`.`topic_id` = `postings`.`postable_id` INNER JOIN `users` ON `users`.`id` = `postings`.`user_id` WHERE `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` WHERE `users`.`identity_id` = 51671) AND `postings`.`user_id` IN (SELECT `users`.`id` FROM `users` INNER JOIN `accounts` ON `accounts`.`id` = `users`.`account_id` WHERE `users`.`identity_id` = 51671 AND (`accounts`.`status` = 0 OR `accounts`.`purpose` = 2 AND `accounts`.`status` = 1)) AND `postings`.`postable_type` = 'Topic' AND `involvements`.`contact_id` = 84954100 AND (`users`.`account_id` = `involvements`.`account_id`) ORDER BY `postings`.`active_at` DESC, `postings`.`id` DESC LIMIT 10

View File

@@ -48,6 +48,18 @@ class CliAccessoryTest < CliTestCase
run_command("reboot", "mysql")
end
test "reboot all" do
Kamal::Commands::Registry.any_instance.expects(:login).times(3)
Kamal::Cli::Accessory.any_instance.expects(:stop).with("mysql")
Kamal::Cli::Accessory.any_instance.expects(:remove_container).with("mysql")
Kamal::Cli::Accessory.any_instance.expects(:boot).with("mysql", login: false)
Kamal::Cli::Accessory.any_instance.expects(:stop).with("redis")
Kamal::Cli::Accessory.any_instance.expects(:remove_container).with("redis")
Kamal::Cli::Accessory.any_instance.expects(:boot).with("redis", login: false)
run_command("reboot", "all")
end
test "start" do
assert_match "docker container start app-mysql", run_command("start", "mysql")
end
@@ -136,6 +148,30 @@ class CliAccessoryTest < CliTestCase
assert_match "rm -rf app-mysql", run_command("remove_service_directory", "mysql")
end
test "hosts param respected" do
Kamal::Cli::Accessory.any_instance.expects(:directories).with("redis")
Kamal::Cli::Accessory.any_instance.expects(:upload).with("redis")
run_command("boot", "redis", "--hosts", "1.1.1.1").tap do |output|
assert_match /docker login.*on 1.1.1.1/, output
refute_match /docker login.*on 1.1.1.2/, output
assert_match "docker run --name app-redis --detach --restart unless-stopped --log-opt max-size=\"10m\" --publish 6379:6379 --env-file .kamal/env/accessories/app-redis.env --volume $PWD/app-redis/data:/data --label service=\"app-redis\" redis:latest on 1.1.1.1", output
refute_match "docker run --name app-redis --detach --restart unless-stopped --log-opt max-size=\"10m\" --publish 6379:6379 --env-file .kamal/env/accessories/app-redis.env --volume $PWD/app-redis/data:/data --label service=\"app-redis\" redis:latest on 1.1.1.2", output
end
end
test "hosts param intersected with configuration" do
Kamal::Cli::Accessory.any_instance.expects(:directories).with("redis")
Kamal::Cli::Accessory.any_instance.expects(:upload).with("redis")
run_command("boot", "redis", "--hosts", "1.1.1.1,1.1.1.3").tap do |output|
assert_match /docker login.*on 1.1.1.1/, output
refute_match /docker login.*on 1.1.1.3/, output
assert_match "docker run --name app-redis --detach --restart unless-stopped --log-opt max-size=\"10m\" --publish 6379:6379 --env-file .kamal/env/accessories/app-redis.env --volume $PWD/app-redis/data:/data --label service=\"app-redis\" redis:latest on 1.1.1.1", output
refute_match "docker run --name app-redis --detach --restart unless-stopped --log-opt max-size=\"10m\" --publish 6379:6379 --env-file .kamal/env/accessories/app-redis.env --volume $PWD/app-redis/data:/data --label service=\"app-redis\" redis:latest on 1.1.1.3", output
end
end
private
def run_command(*command)
stdouted { Kamal::Cli::Accessory.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) }

View File

@@ -57,7 +57,7 @@ class CliBuildTest < CliTestCase
run_command("pull").tap do |output|
assert_match /docker image rm --force dhh\/app:999/, output
assert_match /docker pull dhh\/app:999/, output
assert_match "docker inspect -f '{{ .Config.Labels.service }}' dhh/app:999 | grep -x app || (echo \"Image dhh/app:999 is missing the `service` label\" && exit 1)", output
assert_match "docker inspect -f '{{ .Config.Labels.service }}' dhh/app:999 | grep -x app || (echo \"Image dhh/app:999 is missing the 'service' label\" && exit 1)", output
end
end

View File

@@ -64,9 +64,19 @@ class CliHealthcheckTest < CliTestCase
end
assert_match "container not ready (unhealthy)", exception.message
end
test "raises an exception if primary does not have traefik" do
SSHKit::Backend::Abstract.any_instance.expects(:execute).never
exception = assert_raises do
run_command("perform", config_file: "test/fixtures/deploy_workers_only.yml")
end
assert_equal "The primary host is not configured to run Traefik", exception.message
end
private
def run_command(*command)
stdouted { Kamal::Cli::Healthcheck.start([*command, "-c", "test/fixtures/deploy_with_accessories.yml"]) }
def run_command(*command, config_file: "test/fixtures/deploy_with_accessories.yml")
stdouted { Kamal::Cli::Healthcheck.start([*command, "-c", config_file]) }
end
end

View File

@@ -2,12 +2,47 @@ require_relative "cli_test_case"
class CliMainTest < CliTestCase
test "setup" do
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:server:bootstrap")
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:env:push")
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:accessory:boot", [ "all" ])
invoke_options = { "config_file" => "test/fixtures/deploy_simple.yml", "version" => "999", "skip_hooks" => false }
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:server:bootstrap", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:env:push", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:accessory:boot", [ "all" ], invoke_options)
Kamal::Cli::Main.any_instance.expects(:deploy)
run_command("setup")
run_command("setup").tap do |output|
assert_match /Ensure Docker is installed.../, output
assert_match /Push env files.../, output
end
end
test "setup with skip_push" do
invoke_options = { "config_file" => "test/fixtures/deploy_simple.yml", "version" => "999", "skip_hooks" => false }
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:server:bootstrap", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:env:push", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:accessory:boot", [ "all" ], invoke_options)
# deploy
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:registry:login", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:build:pull", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:traefik:boot", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:healthcheck:perform", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:app:stale_containers", [], invoke_options.merge(stop: true))
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:app:boot", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:prune:all", [], invoke_options)
run_command("setup", "--skip_push").tap do |output|
assert_match /Ensure Docker is installed.../, output
assert_match /Push env files.../, output
# deploy
assert_match /Acquiring the deploy lock/, output
assert_match /Log into image registry/, output
assert_match /Pull app image/, output
assert_match /Ensure Traefik is running/, output
assert_match /Ensure app can pass healthcheck/, output
assert_match /Detect stale containers/, output
assert_match /Prune old containers and images/, output
assert_match /Releasing the deploy lock/, output
end
end
test "deploy" do
@@ -122,6 +157,21 @@ class CliMainTest < CliTestCase
refute_match /Running the post-deploy hook.../, output
end
end
test "deploy without healthcheck if primary host doesn't have traefik" do
invoke_options = { "config_file" => "test/fixtures/deploy_workers_only.yml", "version" => "999", "skip_hooks" => false }
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:healthcheck:perform", [], invoke_options).never
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:registry:login", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:build:deliver", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:traefik:boot", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:app:stale_containers", [], invoke_options.merge(stop: true))
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:app:boot", [], invoke_options)
Kamal::Cli::Main.any_instance.expects(:invoke).with("kamal:cli:prune:all", [], invoke_options)
run_command("deploy", config_file: "deploy_workers_only")
end
test "deploy with missing secrets" do
invoke_options = { "config_file" => "test/fixtures/deploy_with_secrets.yml", "version" => "999", "skip_hooks" => false }

View File

@@ -20,6 +20,15 @@ class CliPruneTest < CliTestCase
assert_match /docker ps -q -a --filter label=service=app --filter status=created --filter status=exited --filter status=dead | tail -n +6 | while read container_id; do docker rm $container_id; done on 1.1.1.\d/, output
assert_match /docker container prune --force --filter label=service=healthcheck-app on 1.1.1.\d/, output
end
run_command("containers", "--retain", "10").tap do |output|
assert_match /docker ps -q -a --filter label=service=app --filter status=created --filter status=exited --filter status=dead | tail -n +11 | while read container_id; do docker rm $container_id; done on 1.1.1.\d/, output
assert_match /docker container prune --force --filter label=service=healthcheck-app on 1.1.1.\d/, output
end
assert_raises(RuntimeError, "retain must be at least 1") do
run_command("containers", "--retain", "0")
end
end
private

View File

@@ -21,12 +21,15 @@ class CliServerTest < CliTestCase
test "bootstrap install as root user" do
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(:docker, "-v", raise_on_non_zero_exit: false).returns(false).at_least_once
SSHKit::Backend::Abstract.any_instance.expects(:execute).with('[ "${EUID:-$(id -u)}" -eq 0 ] || command -v sudo >/dev/null || command -v su >/dev/null', raise_on_non_zero_exit: false).returns(true).at_least_once
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(:curl, "-fsSL", "https://get.docker.com", "|", :sh).at_least_once
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(:sh, "-c", "'curl -fsSL https://get.docker.com || wget -O - https://get.docker.com || echo \"exit 1\"'", "|", :sh).at_least_once
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(:mkdir, "-p", ".kamal").returns("").at_least_once
Kamal::Commands::Hook.any_instance.stubs(:hook_exists?).returns(true)
SSHKit::Backend::Abstract.any_instance.expects(:execute).with(".kamal/hooks/docker-setup", anything).at_least_once
run_command("bootstrap").tap do |output|
("1.1.1.1".."1.1.1.4").map do |host|
assert_match "Missing Docker on #{host}. Installing…", output
assert_match "Running the docker-setup hook", output
end
end
end

View File

@@ -24,8 +24,10 @@ class CommanderTest < ActiveSupport::TestCase
@kamal.specific_hosts = [ "*" ]
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3", "1.1.1.4" ], @kamal.hosts
@kamal.specific_hosts = [ "*miss" ]
assert_equal [], @kamal.hosts
exception = assert_raises(ArgumentError) do
@kamal.specific_hosts = [ "*miss" ]
end
assert_match /hosts match for \*miss/, exception.message
end
test "filtering hosts by filtering roles" do
@@ -33,6 +35,11 @@ class CommanderTest < ActiveSupport::TestCase
@kamal.specific_roles = [ "web" ]
assert_equal [ "1.1.1.1", "1.1.1.2" ], @kamal.hosts
exception = assert_raises(ArgumentError) do
@kamal.specific_roles = [ "*miss" ]
end
assert_match /roles match for \*miss/, exception.message
end
test "filtering roles" do
@@ -50,8 +57,10 @@ class CommanderTest < ActiveSupport::TestCase
@kamal.specific_roles = [ "*" ]
assert_equal [ "web", "workers" ], @kamal.roles.map(&:name)
@kamal.specific_roles = [ "*miss" ]
assert_equal [], @kamal.roles.map(&:name)
exception = assert_raises(ArgumentError) do
@kamal.specific_roles = [ "*miss" ]
end
assert_match /roles match for \*miss/, exception.message
end
test "filtering roles by filtering hosts" do
@@ -74,14 +83,14 @@ class CommanderTest < ActiveSupport::TestCase
end
test "primary_role" do
assert_equal "web", @kamal.primary_role
assert_equal "web", @kamal.primary_role.name
@kamal.specific_roles = "workers"
assert_equal "workers", @kamal.primary_role
assert_equal "workers", @kamal.primary_role.name
end
test "roles_on" do
assert_equal [ "web" ], @kamal.roles_on("1.1.1.1")
assert_equal [ "workers" ], @kamal.roles_on("1.1.1.3")
assert_equal [ "web" ], @kamal.roles_on("1.1.1.1").map(&:name)
assert_equal [ "workers" ], @kamal.roles_on("1.1.1.3").map(&:name)
end
test "default group strategy" do
@@ -100,6 +109,21 @@ class CommanderTest < ActiveSupport::TestCase
assert_equal({ in: :groups, limit: 1, wait: 2 }, @kamal.boot_strategy)
end
test "percentage-based group strategy limit is at least 1" do
configure_with(:deploy_with_low_percentage_boot_strategy)
assert_equal({ in: :groups, limit: 1, wait: 2 }, @kamal.boot_strategy)
end
test "try to match the primary role from a list of specific roles" do
configure_with(:deploy_primary_web_role_override)
@kamal.specific_roles = [ "web_*" ]
assert_equal [ "web_chicago", "web_tokyo" ], @kamal.roles.map(&:name)
assert_equal "web_tokyo", @kamal.primary_role.name
assert_equal "1.1.1.3", @kamal.primary_host
end
private
def configure_with(variant)
@kamal = Kamal::Commander.new.tap do |kamal|

View File

@@ -34,6 +34,7 @@ class CommandsAccessoryTest < ActiveSupport::TestCase
]
},
"busybox" => {
"service" => "custom-busybox",
"image" => "busybox:latest",
"host" => "1.1.1.7"
}
@@ -57,7 +58,7 @@ class CommandsAccessoryTest < ActiveSupport::TestCase
new_command(:redis).run.join(" ")
assert_equal \
"docker run --name app-busybox --detach --restart unless-stopped --log-opt max-size=\"10m\" --env-file .kamal/env/accessories/app-busybox.env --label service=\"app-busybox\" busybox:latest",
"docker run --name custom-busybox --detach --restart unless-stopped --log-opt max-size=\"10m\" --env-file .kamal/env/accessories/custom-busybox.env --label service=\"custom-busybox\" busybox:latest",
new_command(:busybox).run.join(" ")
end
@@ -65,7 +66,7 @@ class CommandsAccessoryTest < ActiveSupport::TestCase
@config[:logging] = { "driver" => "local", "options" => { "max-size" => "100m", "max-file" => "3" } }
assert_equal \
"docker run --name app-busybox --detach --restart unless-stopped --log-driver \"local\" --log-opt max-size=\"100m\" --log-opt max-file=\"3\" --env-file .kamal/env/accessories/app-busybox.env --label service=\"app-busybox\" busybox:latest",
"docker run --name custom-busybox --detach --restart unless-stopped --log-driver \"local\" --log-opt max-size=\"100m\" --log-opt max-file=\"3\" --env-file .kamal/env/accessories/custom-busybox.env --label service=\"custom-busybox\" busybox:latest",
new_command(:busybox).run.join(" ")
end

View File

@@ -71,6 +71,15 @@ class CommandsAppTest < ActiveSupport::TestCase
new_command.run.join(" ")
end
test "run with role logging config" do
@config[:logging] = { "driver" => "local", "options" => { "max-size" => "10m", "max-file" => "3" } }
@config[:servers] = { "web" => { "hosts" => [ "1.1.1.1" ], "logging" => { "driver" => "local", "options" => { "max-size" => "100m" } } } }
assert_equal \
"docker run --detach --restart unless-stopped --name app-web-999 -e KAMAL_CONTAINER_NAME=\"app-web-999\" -e KAMAL_VERSION=\"999\" --env-file .kamal/env/roles/app-web.env --health-cmd \"(curl -f http://localhost:3000/up || exit 1) && (stat /tmp/kamal-cord/cord > /dev/null || exit 1)\" --health-interval \"1s\" --volume $(pwd)/.kamal/cords/app-web-12345678901234567890123456789012:/tmp/kamal-cord --log-driver \"local\" --log-opt max-size=\"100m\" --log-opt max-file=\"3\" --label service=\"app\" --label role=\"web\" --label traefik.http.services.app-web.loadbalancer.server.scheme=\"http\" --label traefik.http.routers.app-web.rule=\"PathPrefix(\\`/\\`)\" --label traefik.http.routers.app-web.priority=\"2\" --label traefik.http.middlewares.app-web-retry.retry.attempts=\"5\" --label traefik.http.middlewares.app-web-retry.retry.initialinterval=\"500ms\" --label traefik.http.routers.app-web.middlewares=\"app-web-retry@docker\" dhh/app:999",
new_command.run.join(" ")
end
test "start" do
assert_equal \
"docker start app-web-999",
@@ -145,12 +154,20 @@ class CommandsAppTest < ActiveSupport::TestCase
test "follow logs" do
assert_match \
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --tail 10 --follow 2>&1",
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --follow 2>&1",
new_command.follow_logs(host: "app-1")
assert_match \
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --tail 10 --follow 2>&1 | grep \"Completed\"",
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --follow 2>&1 | grep \"Completed\"",
new_command.follow_logs(host: "app-1", grep: "Completed")
assert_match \
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --tail 123 --follow 2>&1",
new_command.follow_logs(host: "app-1", lines: 123)
assert_match \
"docker ps --quiet --filter label=service=app --filter label=role=web --filter status=running --filter status=restarting --latest | xargs docker logs --timestamps --tail 123 --follow 2>&1 | grep \"Completed\"",
new_command.follow_logs(host: "app-1", lines: 123, grep: "Completed")
end
@@ -383,6 +400,7 @@ class CommandsAppTest < ActiveSupport::TestCase
private
def new_command(role: "web", **additional_config)
Kamal::Commands::App.new(Kamal::Configuration.new(@config.merge(additional_config), destination: @destination, version: "999"), role: role)
config = Kamal::Configuration.new(@config.merge(additional_config), destination: @destination, version: "999")
Kamal::Commands::App.new(config, role: config.role(role))
end
end

View File

@@ -37,6 +37,14 @@ class CommandsBuilderTest < ActiveSupport::TestCase
builder.push.join(" ")
end
test "target multiarch local when arch is set" do
builder = new_builder_command(builder: { "local" => { "arch" => "amd64" } })
assert_equal "multiarch", builder.name
assert_equal \
"docker buildx build --push --platform linux/amd64 --builder kamal-app-multiarch -t dhh/app:123 -t dhh/app:latest --label service=\"app\" --file Dockerfile .",
builder.push.join(" ")
end
test "target native remote when only remote is set" do
builder = new_builder_command(builder: { "remote" => { "arch" => "amd64" }, "cache" => { "type" => "gha" } })
assert_equal "native/remote", builder.name
@@ -103,8 +111,16 @@ class CommandsBuilderTest < ActiveSupport::TestCase
builder.push.join(" ")
end
test "build with ssh agent socket" do
builder = new_builder_command(builder: { "ssh" => 'default=$SSH_AUTH_SOCK' })
assert_equal \
"-t dhh/app:123 -t dhh/app:latest --label service=\"app\" --file Dockerfile --ssh default=$SSH_AUTH_SOCK",
builder.target.build_options.join(" ")
end
test "validate image" do
assert_equal "docker inspect -f '{{ .Config.Labels.service }}' dhh/app:123 | grep -x app || (echo \"Image dhh/app:123 is missing the `service` label\" && exit 1)", new_builder_command.validate_image.join(" ")
assert_equal "docker inspect -f '{{ .Config.Labels.service }}' dhh/app:123 | grep -x app || (echo \"Image dhh/app:123 is missing the 'service' label\" && exit 1)", new_builder_command.validate_image.join(" ")
end
private

View File

@@ -9,7 +9,7 @@ class CommandsDockerTest < ActiveSupport::TestCase
end
test "install" do
assert_equal "curl -fsSL https://get.docker.com | sh", @docker.install.join(" ")
assert_equal "sh -c 'curl -fsSL https://get.docker.com || wget -O - https://get.docker.com || echo \"exit 1\"' | sh", @docker.install.join(" ")
end
test "installed?" do

View File

@@ -23,7 +23,11 @@ class CommandsPruneTest < ActiveSupport::TestCase
test "app containers" do
assert_equal \
"docker ps -q -a --filter label=service=app --filter status=created --filter status=exited --filter status=dead | tail -n +6 | while read container_id; do docker rm $container_id; done",
new_command.app_containers.join(" ")
new_command.app_containers(retain: 5).join(" ")
assert_equal \
"docker ps -q -a --filter label=service=app --filter status=created --filter status=exited --filter status=dead | tail -n +4 | while read container_id; do docker rm $container_id; done",
new_command.app_containers(retain: 3).join(" ")
end
test "healthcheck containers" do

View File

@@ -15,7 +15,7 @@ class CommandsRegistryTest < ActiveSupport::TestCase
test "registry login" do
assert_equal \
"docker login hub.docker.com -u dhh -p secret",
"docker login hub.docker.com -u \"dhh\" -p \"secret\"",
@registry.login.join(" ")
end
@@ -24,7 +24,18 @@ class CommandsRegistryTest < ActiveSupport::TestCase
@config[:registry]["password"] = [ "KAMAL_REGISTRY_PASSWORD" ]
assert_equal \
"docker login hub.docker.com -u dhh -p more-secret",
"docker login hub.docker.com -u \"dhh\" -p \"more-secret\"",
@registry.login.join(" ")
ensure
ENV.delete("KAMAL_REGISTRY_PASSWORD")
end
test "registry login escape password" do
ENV["KAMAL_REGISTRY_PASSWORD"] = "more-secret'\""
@config[:registry]["password"] = [ "KAMAL_REGISTRY_PASSWORD" ]
assert_equal \
"docker login hub.docker.com -u \"dhh\" -p \"more-secret'\\\"\"",
@registry.login.join(" ")
ensure
ENV.delete("KAMAL_REGISTRY_PASSWORD")
@@ -35,7 +46,7 @@ class CommandsRegistryTest < ActiveSupport::TestCase
@config[:registry]["username"] = [ "KAMAL_REGISTRY_USERNAME" ]
assert_equal \
"docker login hub.docker.com -u also-secret -p secret",
"docker login hub.docker.com -u \"also-secret\" -p \"secret\"",
@registry.login.join(" ")
ensure
ENV.delete("KAMAL_REGISTRY_USERNAME")

View File

@@ -49,6 +49,7 @@ class ConfigurationAccessoryTest < ActiveSupport::TestCase
}
},
"monitoring" => {
"service" => "custom-monitoring",
"image" => "monitoring:latest",
"roles" => [ "web" ],
"port" => "4321:4321",
@@ -72,6 +73,7 @@ class ConfigurationAccessoryTest < ActiveSupport::TestCase
test "service name" do
assert_equal "app-mysql", @config.accessory(:mysql).service_name
assert_equal "app-redis", @config.accessory(:redis).service_name
assert_equal "custom-monitoring", @config.accessory(:monitoring).service_name
end
test "port" do
@@ -149,10 +151,16 @@ class ConfigurationAccessoryTest < ActiveSupport::TestCase
assert_match "%", @config.accessory(:mysql).files.keys[2].read
end
test "directories" do
test "directory with a relative path" do
@deploy[:accessories]["mysql"]["directories"] = [ "data:/var/lib/mysql" ]
assert_equal({"$PWD/app-mysql/data"=>"/var/lib/mysql"}, @config.accessory(:mysql).directories)
end
test "directory with an absolute path" do
@deploy[:accessories]["mysql"]["directories"] = [ "/var/data/mysql:/var/lib/mysql" ]
assert_equal({"/var/data/mysql"=>"/var/lib/mysql"}, @config.accessory(:mysql).directories)
end
test "options" do
assert_equal ["--cpus", "\"4\"", "--memory", "\"2GB\""], @config.accessory(:redis).option_args
end

View File

@@ -148,4 +148,14 @@ class ConfigurationBuilderTest < ActiveSupport::TestCase
assert_equal "..", @config_with_builder_option.builder.context
end
test "ssh" do
assert_nil @config.builder.ssh
end
test "setting ssh params" do
@deploy_with_builder_option[:builder] = { "ssh" => 'default=$SSH_AUTH_SOCK' }
assert_equal 'default=$SSH_AUTH_SOCK', @config_with_builder_option.builder.ssh
end
end

View File

@@ -176,6 +176,34 @@ class ConfigurationRoleTest < ActiveSupport::TestCase
ENV["REDIS_PASSWORD"] = nil
end
test "env overwritten by role with secrets" do
@deploy_with_roles[:env] = {
"clear" => {
"REDIS_URL" => "redis://a/b"
},
"secret" => [
"REDIS_PASSWORD"
]
}
@deploy_with_roles[:servers]["workers"]["env"] = {
"clear" => {
"REDIS_URL" => "redis://c/d",
},
}
ENV["REDIS_PASSWORD"] = "secret456"
expected = <<~ENV
REDIS_PASSWORD=secret456
REDIS_URL=redis://c/d
ENV
assert_equal expected, @config_with_roles.role(:workers).env_file.to_s
ensure
ENV["REDIS_PASSWORD"] = nil
end
test "host_env_directory" do
assert_equal ".kamal/env/roles", @config_with_roles.role(:workers).host_env_directory
end

View File

@@ -42,6 +42,16 @@ class ConfigurationTest < ActiveSupport::TestCase
end
end
test "service name valid" do
assert Kamal::Configuration.new(@deploy.tap { _1[:service] = "hey-app1_primary" }).valid?
end
test "service name invalid" do
assert_raise(ArgumentError) do
Kamal::Configuration.new @deploy.tap { _1[:service] = "app.com" }
end
end
test "roles" do
assert_equal %w[ web ], @config.roles.collect(&:name)
assert_equal %w[ web workers ], @config_with_roles.roles.collect(&:name)
@@ -58,9 +68,9 @@ class ConfigurationTest < ActiveSupport::TestCase
assert_equal [ "1.1.1.1", "1.1.1.2", "1.1.1.3" ], @config_with_roles.all_hosts
end
test "primary web host" do
assert_equal "1.1.1.1", @config.primary_web_host
assert_equal "1.1.1.1", @config_with_roles.primary_web_host
test "primary host" do
assert_equal "1.1.1.1", @config.primary_host
assert_equal "1.1.1.1", @config_with_roles.primary_host
end
test "traefik hosts" do
@@ -289,28 +299,32 @@ class ConfigurationTest < ActiveSupport::TestCase
assert_equal "foo", Kamal::Configuration.new(@deploy.merge!(asset_path: "foo")).asset_path
end
test "primary web role" do
assert_equal "web", @config.primary_web_role
test "primary role" do
assert_equal "web", @config.primary_role.name
config = Kamal::Configuration.new(@deploy_with_roles.deep_merge({
servers: { "alternate_web" => { "hosts" => [ "1.1.1.4", "1.1.1.5" ] , "traefik" => true } },
primary_web_role: "alternate_web" } ))
servers: { "alternate_web" => { "hosts" => [ "1.1.1.4", "1.1.1.5" ] } },
primary_role: "alternate_web" } ))
assert_equal "alternate_web", config.primary_web_role
assert_equal "1.1.1.4", config.primary_web_host
assert_equal "alternate_web", config.primary_role.name
assert_equal "1.1.1.4", config.primary_host
assert config.role(:alternate_web).primary?
assert config.role(:alternate_web).running_traefik?
end
test "primary web role no traefik" do
test "primary role missing" do
error = assert_raises(ArgumentError) do
Kamal::Configuration.new(@deploy_with_roles.merge(primary_web_role: "workers"))
end
assert_match /workers needs to have traefik enabled/, error.message
end
test "primary web role missing" do
error = assert_raises(ArgumentError) do
Kamal::Configuration.new(@deploy.merge(primary_web_role: "bar"))
Kamal::Configuration.new(@deploy.merge(primary_role: "bar"))
end
assert_match /bar isn't defined/, error.message
end
test "retain_containers" do
assert_equal 5, @config.retain_containers
config = Kamal::Configuration.new(@deploy_with_roles.merge(retain_containers: 2))
assert_equal 2, config.retain_containers
assert_raises(ArgumentError) { Kamal::Configuration.new(@deploy_with_roles.merge(retain_containers: 0)) }
end
end

View File

@@ -17,4 +17,4 @@ registry:
server: registry.digitalocean.com
username: user
password: pw
primary_web_role: web_tokyo
primary_role: web_tokyo

View File

@@ -0,0 +1,17 @@
service: app
image: dhh/app
servers:
web:
- "1.1.1.1"
- "1.1.1.2"
workers:
- "1.1.1.3"
- "1.1.1.4"
registry:
username: user
password: pw
boot:
limit: 1%
wait: 2

View File

@@ -13,5 +13,5 @@ registry:
password: pw
boot:
limit: 25%
limit: 1%
wait: 2

12
test/fixtures/deploy_workers_only.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
service: app
image: dhh/app
servers:
workers:
traefik: false
hosts:
- 1.1.1.1
- 1.1.1.2
primary_role: workers
registry:
username: user
password: pw

View File

@@ -0,0 +1,3 @@
#!/bin/sh
echo "Docker set up!"
mkdir -p /tmp/${TEST_ID} && touch /tmp/${TEST_ID}/docker-setup

View File

@@ -24,9 +24,10 @@ traefik:
args:
accesslog: true
accesslog.format: json
image: registry:4443/traefik:v2.9
image: registry:4443/traefik:v2.10
accessories:
busybox:
service: custom-busybox
image: registry:4443/busybox:1.36.0
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
roles:

View File

@@ -19,5 +19,9 @@ push_image_to_registry_4443() {
install_kamal
push_image_to_registry_4443 nginx 1-alpine-slim
push_image_to_registry_4443 traefik v2.9
push_image_to_registry_4443 traefik v2.10
push_image_to_registry_4443 busybox 1.36.0
# .ssh is on a shared volume that persists between runs. Clean it up as the
# churn of temporary vm IPs can eventually create conflicts.
rm -f /root/.ssh/known_hosts

View File

@@ -103,7 +103,7 @@ class IntegrationTest < ActiveSupport::TestCase
assert_equal "200", code
end
def wait_for_healthy(timeout: 20)
def wait_for_healthy(timeout: 30)
timeout_at = Time.now + timeout
while docker_compose("ps -a | tail -n +2 | grep -v '(healthy)' | wc -l", capture: true) != "0"
if timeout_at < Time.now

View File

@@ -10,7 +10,7 @@ class LockTest < IntegrationTest
assert_match /Locked by: Deployer at .*\nVersion: #{latest_app_version}\nMessage: Integration Tests/m, status
error = kamal :deploy, capture: true, raise_on_error: false
assert_match /Deploy lock found/m, error
assert_match /Deploy lock found. Run 'kamal lock help' for more information/m, error
kamal :lock, :release

View File

@@ -32,7 +32,7 @@ class MainTest < IntegrationTest
assert_match /Traefik Host: vm2/, details
assert_match /App Host: vm1/, details
assert_match /App Host: vm2/, details
assert_match /traefik:v2.9/, details
assert_match /traefik:v2.10/, details
assert_match /registry:4443\/app:#{first_version}/, details
audit = kamal :audit, capture: true
@@ -60,6 +60,19 @@ class MainTest < IntegrationTest
assert_equal({ "path" => "/up", "port" => 3000, "max_attempts" => 7, "exposed_port" => 3999, "cord"=>"/tmp/kamal-cord", "log_lines" => 50, "cmd"=>"wget -qO- http://localhost > /dev/null || exit 1" }, config[:healthcheck])
end
test "setup and remove" do
# Check remove completes when nothing has been setup yet
kamal :remove, "-y"
assert_no_images_or_containers
kamal :envify
kamal :setup
assert_images_and_containers
kamal :remove, "-y"
assert_no_images_or_containers
end
private
def assert_local_env_file(contents)
assert_equal contents, deployer_exec("cat .env", capture: true)
@@ -84,4 +97,22 @@ class MainTest < IntegrationTest
assert_equal "200", Net::HTTP.get_response(URI.parse("http://localhost:12345/versions/.hidden")).code
end
def vm1_image_ids
docker_compose("exec vm1 docker image ls -q", capture: true).strip.split("\n")
end
def vm1_container_ids
docker_compose("exec vm1 docker ps -a -q", capture: true).strip.split("\n")
end
def assert_no_images_or_containers
assert vm1_image_ids.empty?
assert vm1_container_ids.empty?
end
def assert_images_and_containers
assert vm1_image_ids.any?
assert vm1_container_ids.any?
end
end

View File

@@ -52,11 +52,11 @@ class TraefikTest < IntegrationTest
private
def assert_traefik_running
assert_match /traefik:v2.9 "\/entrypoint.sh/, traefik_details
assert_match /traefik:v2.10 "\/entrypoint.sh/, traefik_details
end
def assert_traefik_not_running
refute_match /traefik:v2.9 "\/entrypoint.sh/, traefik_details
refute_match /traefik:v2.10 "\/entrypoint.sh/, traefik_details
end
def traefik_details