Our project is being charged a high cost. Looks like such commands are not using the partition. Is there a way in bigquery to force the query to become partition aware based on the results for a subquery ?
The following query currently is processing TBs of data.
delete from tableName
where QuoteDate >= cast((SELECT batch_date as start from batch_table where Batch_Status='Running') as timestamp)
Processes 1TB of data.
Ideally this should only process hundred MB of data.
delete from TableName
where
QuoteDate >= '2018-11-01'
Processes ~100MB