Skip to main content

Scan Operator

  • September 12, 2016
  • 4 replies
  • 12 views

babs4JESUS
Forum|alt.badge.img

What exactly does the scan operator do ? I was trying to profile a query and saw that the scan operator was taking a lot of time. Is scanning simply reading from the disk ? Or does it do something else as well ?

4 replies

Sharon_Cutter
Forum|alt.badge.img
  • Participating Frequently
  • September 12, 2016

The Scan operator evaluates predicates and reads data from disk.  It could be slow because of an unoptimized projection.  Expensive predicates (regular expressions, date/time transformations, LIKE, etc ... ) will show up as high "execution time (us)".  

 

  --Sharon

 


babs4JESUS
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • September 13, 2016

Thanks Sharon. 

 

One more quick question : What exactly do the opeartors NetworkSend and NetworkRecv messages mean then ? What exactly is the difference between these operators and the Scan operator ?

 

 


Sharon_Cutter
Forum|alt.badge.img
  • Participating Frequently
  • September 14, 2016

Scan operator is reading the projection and evaluating predicates.  NetworkSend and NetworkRecv are moving data across the network.  For example if you are doing a join and the projections aren't segmented on the join keys.  Or a GROUP BY where the data isn't segmented by the groups.  


babs4JESUS
Forum|alt.badge.img
  • Author
  • Participating Frequently
  • September 14, 2016

Thanks Sharon for the clarification.