[OSM-dev] Potlatch update
Martijn van Oosterhout
kleptog at gmail.com
Wed May 9 19:54:09 BST 2007
On 5/9/07, Robert (Jamie) Munro <rjmunro at arjam.net> wrote:
> Your talking about the database that can't figure out that:
> delete from table;
> means empty the table completely, not one row at a time, so it has an
> extra SQL instruction:
> truncate table;
> that does the exactly the same thing, only quicker.
Umm, postgres distinguishes the two cases also, they also do different
things. For example, the DELETE will fire any ON DELETE triggers and
check foreign keys, whereas TRUNCATE will not (that's why it's
faster). TRUNCATE also takes locks where DELETE doesn't.
MySQL has many strange features, but this isn't one of them.
Have a nice day,
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
More information about the dev