In the last 24 hours, I've received two e-mails asking about adding performance hints / tips to the new web-site. I'll add something, but I'll quickly answer the most common way to improve performance in a query:
If you are having performance problems or a query is using an excessive amount of memory the next tip will help.
QueryADataset does not contain an optimizer. It is not recommended to use CROSS JOINS in your queries, for example,
select * from table1,table2 where table1.id=table2.id AND name like 'bill%'.
Instead, use an INNER JOIN so that rows are filtered as they are joined:
select * from table2 inner join table2 on table1.id=table2.id where name like 'bill%'
For even better performance, use sub-queries as table sources in an INNER JOIN so that rows are filtered before they are joined. For example,
select * from (select * from table1 where name like 'bill%') inner join table2 on table1.id=table2.id