6 ms·
Can you post what a $14,000 SQL query looks like? If nothing else, it can be an example in my SQL 101 course.
by johnnyo 3y ago
Can you post what a $14,000 SQL query looks like?
If nothing else, it can be an example in my SQL 101 course.
- dabernathy89 3y agoThis would make a great educational blog post
- anon84873628 3y agoIt's rarely interesting logic that makes it expensive. Because the per-query charge is not based on compute cycles but the amount of data scanned. This is sufficient: `SELECT * FROM super_wide_table_with_lots_of_text WHERE NOT filter_on_partitions_or_clusters` Select * is dangerous because it's a column store. You really need to look at the schema and select only the things you want. And when exploring the data it's important to use sane limits and pull from a single partition.
- httparchive 3y agoHere you go! SELECT page, url, payload FROM `{table}` WHERE page like '%{site_domain}/%' AND url like '%[EXAMPLE.COM]%' --- There's no LIMIT on it b/c I actually need all the results.