I have a secondary index on a table:
CREATE NULL_FILTERED INDEX RidesByPassenger ON Rides(
passenger_id,
start_time,
)
If I run the following query:
SELECT start_time FROM Rides@{FORCE_INDEX=RidesByPassenger}
WHERE passenger_id='someid' AND start_time IS NOT NULL;
Can I be sure the base table won't be accessed for it? In other words, if I query a secondary index using only the first part of the primary key (in this case passenger_id), will it use only the secondary index? Or the base table as well? Also, is there a way to ask Spanner exactly which tables it's accessing when I run a query?