What is a singleton select/query?

What is a Singleton Select or Singleton query?

I've seen this for the first time in azure. They say that Azure Data Warehouse is not suited for high volumes of singleton selects.

I tried to search about it and looks like singleton selects terminology is very used in oracle. But perhaps they are as simple as a query that returns a single value.

I also have seen a dispute of cursors vs singleton select, like which of them are better.

1 answer

  • answered 2018-01-13 17:20 Dan Guzman

    A singleton query is one that returns no more than one row, which is common in OLTP workloads. There is also a scalar query, which returns a single row and column.

    Not sure about the dispute between singleton queries versus cursors you mentioned but set-based processing is generally preferred over RBAR cursors in relational databases so that queries can be better optimized.