Flex SQLite optimization: adding database name in front of tables
This article on Livedocs says you should add the database name in front of tables.
http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7d47.htmlMy question is, should I do that everywhere where a table name appears or only once?
In this query:select T1.col,T2.col from T1 left join T2 on T1.id=T2.id order by T2.order;
Should I add main.T1
and main.T2
everywhere or 开发者_运维技巧just after for, the first time:
select T1.col,T2.col from main.T1 left join main.T2 on T1.id=T2.id order by T2.order;
Thank you.
Based on a reading of the documentation you cited, I'd say it advises you to use the database name in the FROM clause only:
Always explicitly specify database names along with table names in a statement. (Use “main” if it’s the main database). For example, use SELECT employeeId FROM main.employees rather than SELECT employeeId FROM employees. Explicitly specifying the database name prevents the runtime from having to check each database to find the matching table.
[emphasis added]
精彩评论