Tag Info

New answers tagged

0

Bound to query If you can only change the view, not the query: this is 100 % equivalent using a correlated subquery instead of the LEFT JOIN: CREATE VIEW the_view_new AS SELECT a.id, a.name , (SELECT age_group FROM table_b WHERE id = a.id) AS age_group FROM table_a a; Your query as is just reads top and bottom row from the index now, IOW blazingly ...


5

According to the showplan.xsd for the execution plan, GroupBy appears without minOccurs or maxOccurs attributes which therefore default to [1..1] making the element compulsory, not necessarily content. The child element ColumnReference of type (ColumnReferenceType) has minOccurs 0 and maxOccurs unbounded [0..*], making it optional, hence the allowed empty ...


11

I found this 6 year old blog post mentioning the same behavior. It looks like ROW_NUMBER() always includes a segment operator, whether PARTITION BY is used or not. If I had to guess I would say this is because it makes creating a query plan easier on the engine. If the segment is needed in most cases, and in the cases where it's not needed it's essentially ...



Top 50 recent answers are included