T i m i n g   i s   o f f . 
 
 S E T 
 
 V A C U U M 
 
 B E G I N 
 
 I N S E R T   0   2 
 
 I N S E R T   0   4 1 
 
 I N S E R T   0   8 2 
 
 I N S E R T   0   5 2 0 0 0 
 
 A N A L Y Z E 
 
 = = =   d a t a s e t 
 
   t o t a l _ m e s s a g e s   |   b i g _ c h a t _ m e s s a g e s   
 
 - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - 
 
                     5 2 4 7 2   |                           1 2 0 0 0 
 
 ( 1   r o w ) 
 
 
 
 = = =   1 .   f i r s t   p a g e   ( n o   c u r s o r ) ,   L I M I T   5 1   =   l i m i t + 1 
 
                                                                                                                                             Q U E R Y   P L A N                                                                                                                                             
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   L i m i t     ( c o s t = 0 . 4 1 . . 1 4 . 5 9   r o w s = 5 1   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 0 3 1 . . 0 . 0 3 9   r o w s = 5 1   l o o p s = 1 ) 
 
       B u f f e r s :   s h a r e d   h i t = 5 
 
       - >     I n d e x   S c a n   u s i n g   m e s s a g e s _ c h a t _ c r e a t e d _ i d _ i d x   o n   m e s s a g e s     ( c o s t = 0 . 4 1 . . 3 3 4 3 . 2 3   r o w s = 1 2 0 2 5   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 0 3 1 . . 0 . 0 3 6   r o w s = 5 1   l o o p s = 1 ) 
 
                   I n d e x   C o n d :   ( c h a t _ i d   =   ' 0 0 0 0 0 0 0 0 - 0 0 0 0 - 4 0 0 0 - 8 0 0 0 - 0 0 0 0 0 0 0 c 0 0 0 0 ' : : u u i d ) 
 
                   B u f f e r s :   s h a r e d   h i t = 5 
 
   P l a n n i n g : 
 
       B u f f e r s :   s h a r e d   h i t = 7 
 
   P l a n n i n g   T i m e :   0 . 0 9 1   m s 
 
   E x e c u t i o n   T i m e :   0 . 0 6 3   m s 
 
 ( 9   r o w s ) 
 
 
 
 = = =   2 .   d e e p   p a g e :   k e y s e t   c u r s o r   a f t e r   m e s s a g e   # 1 0 0 0 0   ( q u e r y   u s e d   b y   A P I ) 
 
                                                                                                                                                                                                         Q U E R Y   P L A N                                                                                                                                                                                                         
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   L i m i t     ( c o s t = 0 . 4 1 . . 2 0 . 8 1   r o w s = 5 1   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 0 1 0 . . 0 . 0 1 5   r o w s = 5 1   l o o p s = 1 ) 
 
       B u f f e r s :   s h a r e d   h i t = 4 
 
       - >     I n d e x   S c a n   u s i n g   m e s s a g e s _ c h a t _ c r e a t e d _ i d _ i d x   o n   m e s s a g e s     ( c o s t = 0 . 4 1 . . 3 0 6 4 . 1 0   r o w s = 7 6 6 0   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 0 1 0 . . 0 . 0 1 2   r o w s = 5 1   l o o p s = 1 ) 
 
                   I n d e x   C o n d :   ( ( c h a t _ i d   =   ' 0 0 0 0 0 0 0 0 - 0 0 0 0 - 4 0 0 0 - 8 0 0 0 - 0 0 0 0 0 0 0 c 0 0 0 0 ' : : u u i d )   A N D   ( R O W ( c r e a t e d _ a t ,   i d )   >   R O W ( ' 2 0 2 6 - 0 1 - 0 2   0 0 : 0 0 : 1 0 + 0 0 ' : : t i m e s t a m p   w i t h   t i m e   z o n e ,   ' b f e 6 8 8 c e - a 0 9 4 - 4 f 7 2 - a 3 4 5 - 2 e 7 a 6 e 3 9 c 3 0 b ' : : u u i d ) ) ) 
 
                   B u f f e r s :   s h a r e d   h i t = 4 
 
   P l a n n i n g   T i m e :   0 . 0 4 1   m s 
 
   E x e c u t i o n   T i m e :   0 . 0 6 8   m s 
 
 ( 7   r o w s ) 
 
 
 
 = = =   3 .   f o r   c o m p a r i s o n :   O F F S E T   p a g i n a t i o n   t o   t h e   s a m e   p a g e   ( N O T   u s e d   b y   A P I ) 
 
                                                                                                                 Q U E R Y   P L A N                                                                                                                 
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   L i m i t     ( c o s t = 2 1 9 5 . 8 2 . . 2 1 9 5 . 9 5   r o w s = 5 1   w i d t h = 7 8 )   ( a c t u a l   t i m e = 4 . 3 2 9 . . 4 . 3 3 3   r o w s = 5 1   l o o p s = 1 ) 
 
       B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
       - >     S o r t     ( c o s t = 2 1 7 0 . 8 2 . . 2 2 0 0 . 8 8   r o w s = 1 2 0 2 5   w i d t h = 7 8 )   ( a c t u a l   t i m e = 3 . 8 5 0 . . 4 . 0 9 6   r o w s = 1 0 0 5 1   l o o p s = 1 ) 
 
                   S o r t   K e y :   c r e a t e d _ a t ,   i d 
 
                   S o r t   M e t h o d :   q u i c k s o r t     M e m o r y :   1 9 7 8 k B 
 
                   B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
                   - >     S e q   S c a n   o n   m e s s a g e s     ( c o s t = 0 . 0 0 . . 1 3 5 5 . 9 0   r o w s = 1 2 0 2 5   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 0 0 8 . . 2 . 0 3 3   r o w s = 1 2 0 0 0   l o o p s = 1 ) 
 
                               F i l t e r :   ( c h a t _ i d   =   ' 0 0 0 0 0 0 0 0 - 0 0 0 0 - 4 0 0 0 - 8 0 0 0 - 0 0 0 0 0 0 0 c 0 0 0 0 ' : : u u i d ) 
 
                               R o w s   R e m o v e d   b y   F i l t e r :   4 0 4 7 2 
 
                               B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
   P l a n n i n g   T i m e :   0 . 0 4 4   m s 
 
   E x e c u t i o n   T i m e :   4 . 4 5 0   m s 
 
 ( 1 2   r o w s ) 
 
 
 
 = = =   4 .   s a m e   k e y s e t   q u e r y   W I T H O U T   m e s s a g e s _ c h a t _ c r e a t e d _ i d _ i d x   ( i n d e x   d r o p p e d   i n s i d e   t h e   t r a n s a c t i o n ) 
 
 D R O P   I N D E X 
 
                                                                                                                                                                                                           Q U E R Y   P L A N                                                                                                                                                                                                           
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
   L i m i t     ( c o s t = 1 8 7 3 . 8 1 . . 1 8 7 3 . 9 4   r o w s = 5 1   w i d t h = 7 8 )   ( a c t u a l   t i m e = 1 . 9 9 9 . . 2 . 0 0 3   r o w s = 5 1   l o o p s = 1 ) 
 
       B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
       - >     S o r t     ( c o s t = 1 8 7 3 . 8 1 . . 1 8 9 2 . 9 6   r o w s = 7 6 6 0   w i d t h = 7 8 )   ( a c t u a l   t i m e = 1 . 9 9 8 . . 2 . 0 0 0   r o w s = 5 1   l o o p s = 1 ) 
 
                   S o r t   K e y :   c r e a t e d _ a t ,   i d 
 
                   S o r t   M e t h o d :   t o p - N   h e a p s o r t     M e m o r y :   3 1 k B 
 
                   B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
                   - >     S e q   S c a n   o n   m e s s a g e s     ( c o s t = 0 . 0 0 . . 1 6 1 8 . 2 6   r o w s = 7 6 6 0   w i d t h = 7 8 )   ( a c t u a l   t i m e = 0 . 4 2 4 . . 1 . 8 7 4   r o w s = 2 0 0 0   l o o p s = 1 ) 
 
                               F i l t e r :   ( ( c h a t _ i d   =   ' 0 0 0 0 0 0 0 0 - 0 0 0 0 - 4 0 0 0 - 8 0 0 0 - 0 0 0 0 0 0 0 c 0 0 0 0 ' : : u u i d )   A N D   ( R O W ( c r e a t e d _ a t ,   i d )   >   R O W ( ' 2 0 2 6 - 0 1 - 0 2   0 0 : 0 0 : 1 0 + 0 0 ' : : t i m e s t a m p   w i t h   t i m e   z o n e ,   ' b f e 6 8 8 c e - a 0 9 4 - 4 f 7 2 - a 3 4 5 - 2 e 7 a 6 e 3 9 c 3 0 b ' : : u u i d ) ) ) 
 
                               R o w s   R e m o v e d   b y   F i l t e r :   5 0 4 7 2 
 
                               B u f f e r s :   s h a r e d   h i t = 7 0 0 
 
   P l a n n i n g : 
 
       B u f f e r s :   s h a r e d   h i t = 4 
 
   P l a n n i n g   T i m e :   0 . 0 7 4   m s 
 
   E x e c u t i o n   T i m e :   2 . 0 1 9   m s 
 
 ( 1 4   r o w s ) 
 
 
 
 R O L L B A C K 
 
 = = =   r o l l e d   b a c k :   s y n t h e t i c   d a t a   r e m o v e d ,   i n d e x   r e s t o r e d 
 
 