|Aleksey Martynov, Amazon Web Services||
Topic: Database query generation and development, tips & tricks, performance tuning
Environment/software: EC2, Amazon SimpleDB, Amazon S3
Level/type: Introductory to intermediate/technical
Amazon SimpleDB is a web service for running queries on structured data in real time. AWS's Aleksey Martynov offers beginners (and even those at an intermediate stage) a two-part coder's look into AWS SimpleDB queries.
Query 101 is an introduction to queries in SimpleDB. You learn about the custom query language the software uses, the select function and how to structure it, what the comparison and set operators are and how to use them. Also, the author provides query examples (the expression, function description, and most likely result you'd see from using it). He also provides examples of simple, range, multi-value attribute, and multiple predicate queries and discusses best ways to sort and count data.
- A pretty thorough introduction to the SimpleDB query language in a very concise space.
- A how-to basically use the language to create database queries.
Query 201 is the logical next step, a list of tips to make your queries from 101 into more efficient ones. In this article, the author discusses:
- Lexicographical comparison definition; for ordering purposes.
- Querying for numerical data; how to massage numerical data in order to preserve the expected order of comparison. Includes techniques negative number offsets and zero-padding.
- Querying for dates; how to convert dates to strings for lexicographical comparison.
- Single vs. multi-predicate queries; how to understand the semantic difference between single predicate and multiple predicate queries and indicate them.
- Using BoxUsage to tune your queries; using a return result of system-resources-used-per-operation so you can fine tune your query.
- Partitioning your dataset in order to improve query performance; how to partition your dataset and "parallelize" your query for better performance.
- Advanced conceptual thinking on parallel processing to performance tune queries ... made pretty simple.