This content has been marked as final. Show 4 replies
Hi Julien,1 person found this helpful
GraphOracleSem.analyze() does not call sem_perf.gather_stats.
Instead, GraphOracleSem.analyze() will call sem_apis.analyze_model. You need to be model owner or DBA to run that procedure, otherwise it should fail.
I knew it called sem_apis.analyze_model. What I meant was : does it run gather_stats afterwards ?
I thought the analysis itself had no effect on performance, and that running gather_stats afterwards was necessary (according to what matperry said, it is necessary to run gather_stats : Re: Queries on Large Datasets Not Returning
Apparently, I do not understand the roles of these procedures. One is said to be collecting optimizer statistics and the other one to be gathering statistics.
What is the difference ?
I know they're using different names (analyze vs gather stats), but in the end both methods are doing the same function: gathering statistics so that the optimizer can come up with a good plan.
Now, the difference between semperf.gather_stats and sem_apis.analyze_model is that the former is gathering statistics on the whole rdf network (all models), and it also includes the rdf_value$ table. Sem_apis.analyze_model only gathers statistics on a given semantic model.
Another difference is that analyze_model gives you more fine-grained control over statistics gathering (as shown here Re: Queries on Large Datasets Not Returning with the multi column statistics). Sem_perf.gather_stats uses 'FOR ALL COLUMNS SIZE AUTO' option for method_opt.
Thanks for these details.