New to Postgres, Oracle background.  With Oracle the amount of work a query 
does is tracked via logical reads.  Oracle tracks logical and physical reads 
differently than Postgres.  With Oracle a physical read is always considered a 
logical read.  So if a query reads 5 blocks are all 5 are read from disk the 
query would do 5 logical reads, 5 physical reads.  It appears with Postgres 
Buffers shared hit are reads from memory and Buffer shared read is off disk.  
To get total reads one would need to add up shared hits + shared reads.

I have a sample query that is doing more work if some of the reads are physical 
reads and I'm trying to understand why.  If you look at attached 
QueryWithPhyReads.txt it shows the query did Buffers: shared hit=171 read=880.  
So it did 171 + 880 = 1051 total block reads (some logical, some physical).  
QueryWithNoPhyReads.txt shows execution statistics of the execution of the 
exact same query with same data point.  The only difference is the first 
execution loaded blocks into memory so this execution had all shared hits.  In 
this case the query did this much work:  Buffers: shared hit=581.

With Oracle that would not happen.  If the 2nd execution of the query did all 
reads from memory the shared hits would be 1051, not 581.

So it appears to me that with Postgres when a query does physical reads it not 
only has the expense of doing those disk reads but there is also extra work 
done to increase overall block reads for a query.  But I don't understand why 
that would be the case.  Could someone explain why this is happening?

Thanks
This e-mail is for the sole use of the intended recipient and contains 
information that may be privileged and/or confidential. If you are not an 
intended recipient, please notify the sender by return e-mail and delete this 
e-mail and any attachments. Certain required legal entity disclosures can be 
accessed on our website: 
https://www.thomsonreuters.com/en/resources/disclosures.html
 explain (analyze, verbose, costs, settings, buffers, timing, summary, hashes)
(/*+ IndexScan(historyeve0_ history_event_idx02) */ select distinct 
historyeve0_.EVENT_TYPE as junk123
from HISTORY_EVENT historyeve0_
where historyeve0_.PRISM_GUID='i0acc051c00000133f57f4be2bbbdc5ef'
and historyeve0_.IS_DELETED=0
and (historyeve0_.EVENT_TYPE not in 
('versionsSearchWithinQueryEvent','notesOfDecisionsSearchWithinQueryEvent','citingReferencesSearchWithinQueryEvent','tocSearchWithinQueryEvent','searchWithinDocumentEvent'
 ))
and (historyeve0_.PRODUCT_VIEW in 
('DefaultProductView','TNPPlus','PLCUS','Indigo','INDIGOCA' )
or historyeve0_.PRODUCT_VIEW is null)
and historyeve0_.PRODUCT_SID='WestlawNext'
order by historyeve0_.EVENT_TYPE asc);


 Sort  (cost=12350.30..12350.80 rows=200 width=13) (actual time=11.686..11.693 
rows=6 loops=1)
   Output: historyeve0_.event_type
   Sort Key: historyeve0_.event_type
   Sort Method: quicksort  Memory: 25kB
   Buffers: shared hit=581
   ->  HashAggregate  (cost=12340.65..12342.65 rows=200 width=13) (actual 
time=11.676..11.683 rows=6 loops=1)
         Output: historyeve0_.event_type
         Group Key: historyeve0_.event_type
         Buffers: shared hit=581
         ->  Append  (cost=0.55..12334.42 rows=2492 width=13) (actual 
time=0.035..10.759 rows=5566 loops=1)
               Buffers: shared hit=581
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp__idx on 
hist2.history_event_display_timestamp_20200601 historyeve0_  
(cost=0.55..1758.76 rows=362 width=13) (actual time=0.035..1.857 rows=1020 
loops=1)
                     Output: historyeve0_.event_type
                     Index Cond: (((historyeve0_.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0_.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0_.is_deleted = '0'::numeric))
                     Filter: (((historyeve0_.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0_.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0_.product_view IS NULL)))
                     Rows Removed by Filter: 5
                     Buffers: shared hit=85
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx1 on 
hist2.history_event_display_timestamp_20200701 historyeve0__1  
(cost=0.55..1351.59 rows=276 width=13) (actual time=0.029..1.435 rows=800 
loops=1)
                     Output: historyeve0__1.event_type
                     Index Cond: (((historyeve0__1.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__1.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__1.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__1.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__1.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__1.product_view IS NULL)))
                     Rows Removed by Filter: 4
                     Buffers: shared hit=70
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx2 on 
hist2.history_event_display_timestamp_20200801 historyeve0__2  
(cost=0.55..468.34 rows=97 width=13) (actual time=0.031..0.331 rows=173 loops=1)
                     Output: historyeve0__2.event_type
                     Index Cond: (((historyeve0__2.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__2.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__2.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__2.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__2.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__2.product_view IS NULL)))
                     Buffers: shared hit=26
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx3 on 
hist2.history_event_display_timestamp_20200901 historyeve0__3  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.010..0.010 rows=0 loops=1)
                     Output: historyeve0__3.event_type
                     Index Cond: (((historyeve0__3.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__3.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__3.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__3.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__3.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__3.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx4 on 
hist2.history_event_display_timestamp_20201001 historyeve0__4  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.014..0.014 rows=0 loops=1)
                     Output: historyeve0__4.event_type
                     Index Cond: (((historyeve0__4.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__4.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__4.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__4.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__4.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__4.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx5 on 
hist2.history_event_display_timestamp_20201101 historyeve0__5  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.008..0.008 rows=0 loops=1)
                     Output: historyeve0__5.event_type
                     Index Cond: (((historyeve0__5.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__5.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__5.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__5.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__5.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__5.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx6 on 
hist2.history_event_display_timestamp_20201201 historyeve0__6  
(cost=0.55..766.81 rows=155 width=13) (actual time=0.030..0.600 rows=329 
loops=1)
                     Output: historyeve0__6.event_type
                     Index Cond: (((historyeve0__6.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__6.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__6.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__6.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__6.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__6.product_view IS NULL)))
                     Rows Removed by Filter: 1
                     Buffers: shared hit=36
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx7 on 
hist2.history_event_display_timestamp_20210101 historyeve0__7  
(cost=0.55..371.57 rows=76 width=13) (actual time=0.028..0.271 rows=138 loops=1)
                     Output: historyeve0__7.event_type
                     Index Cond: (((historyeve0__7.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__7.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__7.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__7.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__7.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__7.product_view IS NULL)))
                     Buffers: shared hit=23
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx8 on 
hist2.history_event_display_timestamp_20210201 historyeve0__8  
(cost=0.55..1960.35 rows=403 width=13) (actual time=0.029..1.281 rows=716 
loops=1)
                     Output: historyeve0__8.event_type
                     Index Cond: (((historyeve0__8.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__8.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__8.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__8.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__8.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__8.product_view IS NULL)))
                     Rows Removed by Filter: 1
                     Buffers: shared hit=66
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx9 on 
hist2.history_event_display_timestamp_20210301 historyeve0__9  
(cost=0.55..1371.73 rows=279 width=13) (actual time=0.029..0.877 rows=488 
loops=1)
                     Output: historyeve0__9.event_type
                     Index Cond: (((historyeve0__9.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__9.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__9.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__9.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__9.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__9.product_view IS NULL)))
                     Rows Removed by Filter: 3
                     Buffers: shared hit=50
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx10 on 
hist2.history_event_display_timestamp_20210401 historyeve0__10  
(cost=0.55..1625.74 rows=325 width=13) (actual time=0.032..1.248 rows=701 
loops=1)
                     Output: historyeve0__10.event_type
                     Index Cond: (((historyeve0__10.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__10.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__10.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__10.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__10.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__10.product_view IS NULL)))
                     Rows Removed by Filter: 2
                     Buffers: shared hit=64
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx11 on 
hist2.history_event_display_timestamp_20210501 historyeve0__11  
(cost=0.55..1738.67 rows=351 width=13) (actual time=0.029..1.175 rows=646 
loops=1)
                     Output: historyeve0__11.event_type
                     Index Cond: (((historyeve0__11.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__11.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__11.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__11.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__11.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__11.product_view IS NULL)))
                     Rows Removed by Filter: 4
                     Buffers: shared hit=64
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx12 on 
hist2.history_event_display_timestamp_20210601 historyeve0__12  
(cost=0.55..794.55 rows=152 width=13) (actual time=0.032..0.784 rows=429 
loops=1)
                     Output: historyeve0__12.event_type
                     Index Cond: (((historyeve0__12.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__12.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__12.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__12.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__12.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__12.product_view IS NULL)))
                     Rows Removed by Filter: 3
                     Buffers: shared hit=51
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx13 on 
hist2.history_event_display_timestamp_20210701 historyeve0__13  
(cost=0.55..23.56 rows=5 width=12) (actual time=0.028..0.245 rows=126loops=1)
                     Output: historyeve0__13.event_type
                     Index Cond: (((historyeve0__13.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__13.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__13.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__13.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__13.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__13.product_view IS NULL)))
                     Buffers: shared hit=22
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx14 on 
hist2.history_event_display_timestamp_20210801 historyeve0__14  
(cost=0.55..8.58 rows=1 width=12) (actual time=0.013..0.014 rows=0 loops=1)
                     Output: historyeve0__14.event_type
                     Index Cond: (((historyeve0__14.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__14.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__14.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__14.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__14.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__14.product_view IS NULL)))
                     Buffers: shared hit=4
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx15 on 
hist2.history_event_display_timestamp_20210901 historyeve0__15  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.011..0.011 rows=0 loops=1)
                     Output: historyeve0__15.event_type
                     Index Cond: (((historyeve0__15.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__15.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__15.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__15.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__15.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__15.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx32 on 
hist2.history_event_display_timestamp_20211001 historyeve0__16  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.011..0.011 rows=0 loops=1)
                     Output: historyeve0__16.event_type
                     Index Cond: (((historyeve0__16.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__16.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__16.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__16.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__16.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__16.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx34 on 
hist2.history_event_display_timestamp_20211101 historyeve0__17  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.011..0.011 rows=0 loops=1)
                     Output: historyeve0__17.event_type
                     Index Cond: (((historyeve0__17.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__17.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__17.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__17.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__17.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__17.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx36 on 
hist2.history_event_display_timestamp_20211201 historyeve0__18  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.013 rows=0 loops=1)
                     Output: historyeve0__18.event_type
                     Index Cond: (((historyeve0__18.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__18.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__18.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__18.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__18.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__18.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx38 on 
hist2.history_event_display_timestamp_20220101 historyeve0__19  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.013 rows=0 loops=1)
                     Output: historyeve0__19.event_type
                     Index Cond: (((historyeve0__19.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__19.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__19.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__19.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__19.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__19.product_view IS NULL)))
                     Buffers: shared hit=2 
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx40 on 
hist2.history_event_display_timestamp_20220201 historyeve0__20  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.013 rows=0 loops=1)
                     Output: historyeve0__20.event_type
                     Index Cond: (((historyeve0__20.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__20.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__20.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__20.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__20.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__20.product_view IS NULL)))
                     Buffers: shared hit=2 
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx42 on 
hist2.history_event_display_timestamp_20220301 historyeve0__21  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.010..0.010 rows=0 loops=1)
                     Output: historyeve0__21.event_type
                     Index Cond: (((historyeve0__21.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__21.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__21.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__21.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__21.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__21.product_view IS NULL)))
                     Buffers: shared hit=2 
 Settings: effective_cache_size = '88283528kB', enable_bitmapscan = 'off', 
search_path = 'hist2'
 Planning Time: 3.762 ms
 Execution Time: 11.863 ms
 SQL Hash: 901113095, Plan Hash: -1815601721
(133 rows)
 explain (analyze, verbose, costs, settings, buffers, timing, summary, hashes)
(/*+ IndexScan(historyeve0_ history_event_idx02) */ select distinct 
historyeve0_.EVENT_TYPE as junk123
from HISTORY_EVENT historyeve0_
where historyeve0_.PRISM_GUID='i0acc051c00000133f57f4be2bbbdc5ef'
and historyeve0_.IS_DELETED=0
and (historyeve0_.EVENT_TYPE not in 
('versionsSearchWithinQueryEvent','notesOfDecisionsSearchWithinQueryEvent','citingReferencesSearchWithinQueryEvent','tocSearchWithinQueryEvent','searchWithinDocumentEvent'
 ))
and (historyeve0_.PRODUCT_VIEW in 
('DefaultProductView','TNPPlus','PLCUS','Indigo','INDIGOCA' )
or historyeve0_.PRODUCT_VIEW is null)
and historyeve0_.PRODUCT_SID='WestlawNext'
order by historyeve0_.EVENT_TYPE asc);


 Sort  (cost=12350.30..12350.80 rows=200 width=13) (actual 
time=646.880..646.889 rows=6 loops=1)
   Output: historyeve0_.event_type
   Sort Key: historyeve0_.event_type
   Sort Method: quicksort  Memory: 25kB
   Buffers: shared hit=171 read=880
   I/O Timings: read=333.505
   ->  HashAggregate  (cost=12340.65..12342.65 rows=200 width=13) (actual 
time=646.868..646.878 rows=6 loops=1)
         Output: historyeve0_.event_type
         Group Key: historyeve0_.event_type
         Buffers: shared hit=171 read=880
         I/O Timings: read=333.505
         ->  Append  (cost=0.55..12334.42 rows=2492 width=13) (actual 
time=1.915..645.743 rows=5566 loops=1)
               Buffers: shared hit=171 read=880
               I/O Timings: read=333.505
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp__idx on 
hist2.history_event_display_timestamp_20200601 historyeve0_  
(cost=0.55..1758.76 rows=362 width=13) (actual time=1.914..122.776 rows=1020 
loops=1)
                     Output: historyeve0_.event_type
                     Index Cond: (((historyeve0_.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0_.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0_.is_deleted = '0'::numeric))
                     Filter: (((historyeve0_.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0_.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0_.product_view IS NULL)))
                     Rows Removed by Filter: 5
                     Buffers: shared hit=15 read=125
                     I/O Timings: read=76.762
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx1 on 
hist2.history_event_display_timestamp_20200701 historyeve0__1  
(cost=0.55..1351.59 rows=276 width=13) (actual time=1.869..87.808 rows=800 
loops=1)
                     Output: historyeve0__1.event_type
                     Index Cond: (((historyeve0__1.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__1.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__1.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__1.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__1.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__1.product_view IS NULL)))
                     Rows Removed by Filter: 4
                     Buffers: shared hit=7 read=85
                     I/O Timings: read=60.467
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx2 on 
hist2.history_event_display_timestamp_20200801 historyeve0__2  
(cost=0.55..468.34 rows=97 width=13) (actual time=1.479..12.984 rows=173 
loops=1)
                     Output: historyeve0__2.event_type
                     Index Cond: (((historyeve0__2.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__2.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__2.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__2.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__2.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__2.product_view IS NULL)))
                     Buffers: shared hit=15 read=13
                     I/O Timings: read=8.322
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx3 on 
hist2.history_event_display_timestamp_20200901 historyeve0__3  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.012..0.012 rows=0 loops=1)
                     Output: historyeve0__3.event_type
                     Index Cond: (((historyeve0__3.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__3.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__3.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__3.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__3.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__3.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx4 on 
hist2.history_event_display_timestamp_20201001 historyeve0__4  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.014..0.014 rows=0 loops=1)
                     Output: historyeve0__4.event_type
                     Index Cond: (((historyeve0__4.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__4.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__4.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__4.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__4.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__4.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx5 on 
hist2.history_event_display_timestamp_20201101 historyeve0__5  (cost=0.14..8.17 
rows=1 width=118) (actual time=0.011..0.011 rows=0 loops=1)
                     Output: historyeve0__5.event_type
                     Index Cond: (((historyeve0__5.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__5.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__5.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__5.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__5.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__5.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx6 on 
hist2.history_event_display_timestamp_20201201 historyeve0__6  
(cost=0.55..766.81 rows=155 width=13) (actual time=1.172..31.168 rows=329 
loops=1)
                     Output: historyeve0__6.event_type
                     Index Cond: (((historyeve0__6.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__6.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__6.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__6.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__6.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__6.product_view IS NULL)))
                     Rows Removed by Filter: 1
                     Buffers: shared hit=11 read=34
                     I/O Timings: read=20.077
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx7 on 
hist2.history_event_display_timestamp_20210101 historyeve0__7  
(cost=0.55..371.57 rows=76 width=13) (actual time=1.467..15.204 rows=138 
loops=1)
                     Output: historyeve0__7.event_type
                     Index Cond: (((historyeve0__7.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__7.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__7.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__7.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__7.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__7.product_view IS NULL)))
                     Buffers: shared hit=12 read=17
                     I/O Timings: read=8.436
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx8 on 
hist2.history_event_display_timestamp_20210201 historyeve0__8  
(cost=0.55..1960.35 rows=403 width=13) (actual time=2.678..87.188 rows=716 
loops=1)
                     Output: historyeve0__8.event_type
                     Index Cond: (((historyeve0__8.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__8.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__8.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__8.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__8.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__8.product_view IS NULL)))
                     Rows Removed by Filter: 1
                     Buffers: shared hit=12 read=113
                     I/O Timings: read=51.819
               ->  Index Scan using 
history_event_display_timesta_prism_guid_display_timestamp_idx9 on 
hist2.history_event_display_timestamp_20210301 historyeve0__9  
(cost=0.55..1371.73 rows=279 width=13) (actual time=1.837..68.129 rows=488 
loops=1)
                     Output: historyeve0__9.event_type
                     Index Cond: (((historyeve0__9.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__9.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__9.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__9.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__9.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__9.product_view IS NULL)))
                     Rows Removed by Filter: 3
                     Buffers: shared hit=14 read=112
                     I/O Timings: read=33.044
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx10 on 
hist2.history_event_display_timestamp_20210401 historyeve0__10  
(cost=0.55..1625.74 rows=325 width=13) (actual time=0.947..103.137 rows=701 
loops=1)
                     Output: historyeve0__10.event_type
                     Index Cond: (((historyeve0__10.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__10.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__10.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__10.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__10.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__10.product_view IS NULL)))
                     Rows Removed by Filter: 2
                     Buffers: shared hit=15 read=139
                     I/O Timings: read=51.782
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx11 on 
hist2.history_event_display_timestamp_20210501 historyeve0__11  
(cost=0.55..1738.67 rows=351 width=13) (actual time=1.056..53.731 rows=646 
loops=1)
                     Output: historyeve0__11.event_type
                     Index Cond: (((historyeve0__11.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__11.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__11.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__11.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__11.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__11.product_view IS NULL)))
                     Rows Removed by Filter: 4
                     Buffers: shared hit=19 read=118
                     I/O Timings: read=6.834
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx12 on 
hist2.history_event_display_timestamp_20210601 historyeve0__12  
(cost=0.55..794.55 rows=152 width=13) (actual time=1.576..45.888 rows=429 
loops=1)
                     Output: historyeve0__12.event_type
                     Index Cond: (((historyeve0__12.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__12.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__12.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__12.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__12.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__12.product_view IS NULL)))
                     Rows Removed by Filter: 3
                     Buffers: shared hit=17 read=91
                     I/O Timings: read=8.620
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx13 on 
hist2.history_event_display_timestamp_20210701 historyeve0__13  
(cost=0.55..23.56 rows=5 width=12) (actual time=1.128..16.989 rows=126 loops=1)
                     Output: historyeve0__13.event_type
                     Index Cond: (((historyeve0__13.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__13.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__13.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__13.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__13.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__13.product_view IS NULL)))
                     Buffers: shared hit=10 read=33
                     I/O Timings: read=7.341
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx14 on 
hist2.history_event_display_timestamp_20210801 historyeve0__14  
(cost=0.55..8.58 rows=1 width=12) (actual time=0.024..0.025 rows=0 loops=1)
                     Output: historyeve0__14.event_type
                     Index Cond: (((historyeve0__14.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__14.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__14.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__14.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__14.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__14.product_view IS NULL)))
                     Buffers: shared hit=4
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx15 on 
hist2.history_event_display_timestamp_20210901 historyeve0__15  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.015..0.015 rows=0 loops=1)
                     Output: historyeve0__15.event_type
                     Index Cond: (((historyeve0__15.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__15.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__15.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__15.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__15.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__15.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx32 on 
hist2.history_event_display_timestamp_20211001 historyeve0__16  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.013 rows=0 loops=1)
                     Output: historyeve0__16.event_type
                     Index Cond: (((historyeve0__16.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__16.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__16.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__16.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__16.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__16.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx34 on 
hist2.history_event_display_timestamp_20211101 historyeve0__17  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.015..0.015 rows=0 loops=1)
                     Output: historyeve0__17.event_type
                     Index Cond: (((historyeve0__17.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__17.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__17.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__17.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__17.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__17.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx36 on 
hist2.history_event_display_timestamp_20211201 historyeve0__18  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.013 rows=0 loops=1)
                     Output: historyeve0__18.event_type
                     Index Cond: (((historyeve0__18.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__18.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__18.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__18.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__18.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__18.product_view IS NULL)))
                     Buffers: shared hit=2
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx38 on 
hist2.history_event_display_timestamp_20220101 historyeve0__19  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.015..0.015 rows=0 loops=1)
                     Output: historyeve0__19.event_type
                     Index Cond: (((historyeve0__19.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__19.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__19.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__19.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__19.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__19.product_view IS NULL)))
                     Buffers: shared hit=2 
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx40 on 
hist2.history_event_display_timestamp_20220201 historyeve0__20  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.015..0.015 rows=0 loops=1)
                     Output: historyeve0__20.event_type
                     Index Cond: (((historyeve0__20.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__20.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__20.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__20.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__20.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__20.product_view IS NULL)))
                     Buffers: shared hit=2 
               ->  Index Scan using 
history_event_display_timest_prism_guid_display_timestamp_idx42 on 
hist2.history_event_display_timestamp_20220301 historyeve0__21  
(cost=0.14..8.17 rows=1 width=118) (actual time=0.013..0.014 rows=0 loops=1)
                     Output: historyeve0__21.event_type
                     Index Cond: (((historyeve0__21.prism_guid)::text = 
'i0acc051c00000133f57f4be2bbbdc5ef'::text) AND 
((historyeve0__21.product_sid)::text = 'WestlawNext'::text) AND 
(historyeve0__21.is_deleted = '0'::numeric))
                     Filter: (((historyeve0__21.event_type)::text <> ALL 
('{versionsSearchWithinQueryEvent,notesOfDecisionsSearchWithinQueryEvent,citingReferencesSearchWithinQueryEvent,tocSearchWithinQueryEvent,searchWithinDocumentEvent}'::text[]))
 AND (((historyeve0__21.product_view)::text = ANY 
('{DefaultProductView,TNPPlus,PLCUS,Indigo,INDIGOCA}'::text[])) OR 
(historyeve0__21.product_view IS NULL)))
                     Buffers: shared hit=2 
 Settings: effective_cache_size = '88283528kB', enable_bitmapscan = 'off', 
search_path = 'hist2'
 Planning Time: 3.774 ms
 Execution Time: 647.086 ms
 SQL Hash: 901113095, Plan Hash: -1815601721
(147 rows)

Reply via email to