How to prepend a Views query with another query? Due to a configuration problem at my host, I'd like to execute the query "SET optimizer_search_depth=0;" in the same DB session as a specific Views query.  I looked into hook_views_query_alter() and hook_views_pre_execute(), but in both cases the query is only available as a Query object.

I think I need some way to modify the raw query string before it's executed, but (presumably) after it's built.  Is this possible?
Why do you think you need to alter the query itself? You literally said you needed to set a …session value.

You can issue any query prior to the views query on that page load to achieve the desired affect. Eg db_query('set mysql_max_group_concat=5;');

If you want to so it in the views lifecycle you could use any hook_views_* api call which states it runs prior to query execution. Look at the views api docs.

Or you could likely use hook_page_build  for all its worth. Or hook_init ... whatever suits your needs.