Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


Is the "Global Optimizer Statistics" section unreliable in a SQL Anywhere Graphical Plan With Statistics?

Should that section be ignored?

In particular, why does it say "Optimization goal All-rows" when all evidence, including the plan's own "Optimizer Statistics" section, says "optimization_goal First-row"?

This is critically important when it comes to debugging performance problems.

Here are some details...

Graphical Plan
top SELECT node
Advanced Details tab
Global Optimizer Statistics
Optimization goal     All-rows     FALSE?

top SELECT node
Details tab
Optimizer Statistics section
optimization_goal     First-row     TRUE?

SET OPTION "PUBLIC"."optimization_goal"='Response-time'

Foxhound Display Schema 
SET OPTION PUBLIC.optimization_goal = 'Response-time'; -- different from default 'All-rows' 

Note: For a TL;DR discussion of 'Response-time' === 'First-row' see this post: Database option optimization_goal value after upgrading database from version 9 to 17

asked 05 Apr '21, 11:33

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

edited 12 Apr '22, 15:27

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 05 Apr '21, 11:33

question was seen: 654 times

last updated: 12 Apr '22, 15:27

Related questions