don't use * in the query ( * is anti-pattern in query, which will create much work for the server )
don't omit column list in insertion (think what if a new column will be added later)
...
Ad hoc is a Latin phrase meaning "for this". It generally signifies a solution designed for a specific problem or task, non-generalizable, and not intended to be able to be adapted to other purposes. Common examples are organizations, committees, and commissions created at the national or international level for a specific task.
Ad hoc query relatively small, random, dynamic, fast
"Ad hoc is latin for "for this purpose". You might call it an "on the fly" query, or a "just so" query. It's the kind of SQL query you just loosely type out where you need it
var newSqlQuery = "SELECT * FROM table WHERE id = " + myId;
...which is an entirely different query each time that line of code is executed, depending on the value of myId
. The opposite of an ad hoc query is a predefined query such as a Stored Procedure, where you have created a single query for the entire generalized purpose of selecting from that table (say), and pass the ID as a variable."
batch processing relatively large, predefined, takes longer time
EMC Corporation (stylized as EMC²) offers data storage, information security, virtualization, analytics, cloud computing and other products and services that enable businesses to store, manage, protect, and analyze data.