I think I get what you’re asking: When you query via the API, the result set you get is always unpivoted. But, queries that are pivoted in looker still return slower, even though they return the same result.
The reason for this is that when you run a query, you are running literally that query— Not an api-ified version of it that’s optimized for the method, not a smaller version, it’s the same exact query. We do not do pivoting on the front-end, so if you open the
SQL tab on an explore with pivoted results, you’ll see some crazy looking SQL that’s doing all the pivoting.
For that reason, when you run an API call on a pivoted query, it’ll be a bit slower than an unpivoted one, since it has to actually run different SQL. Does that make sense? Let me know if I misunderstood