Hi Radovan, On 08/08/2013 09:06 AM, Radovan Bičiště wrote:
Thank you for the prompt reply. Does DELETE FROM without WHERE truncate table storage ?
It should, but a quick experiment showed that the files remain at their original size. Let me get back to you. sql>select "count" from storage() where "table"='starships'; +----------+ | count | +==========+ | 68399658 | | 68399658 | | 68399658 | +----------+ 3 tuples (8.771ms) sql>delete from starships; 68399658 affected rows (1.407ms) sql>select "count" from storage() where "table"='starships'; +-------+ | count | +=======+ | 0 | | 0 | | 0 | +-------+ 3 tuples (8.477ms) sql>select location from storage() where "table"='starships'; +-------------+ | location | +=============+ | 03/75/37501 | | 04/01/40101 | | 03/77/37701 | +-------------+ 3 tuples (8.840ms) ➜ acs ls -lah bat/03/77/37701.tail -rw------- 1 hannes da 261M Aug 8 09:11 bat/03/77/37701.tail Best, Hannes
On 08/08/2013 08:59 AM, Hannes Mühleisen wrote:
Hello Radovan,
On 08/08/2013 08:48 AM, Radovan Bičiště wrote:
I'm trying to "truncate" according to http://www.monetdb.org/Documentation/SQLreference/Updates using DELETE ALL FROM statement. But what I get is syntax error. :(
ceos@lux-analytics:~$ mclient -h localhost -d zkdev1 -u drmaxtst -p 50000 password: Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-SP3) Database: MonetDB v11.15.11 (Feb2013-SP3), 'mapi:monetdb://lux-analytics:50000/zkdev1' Type \q to quit, \? for a list of available commands auto commit mode: on sql>delete all from crmkarta; syntax error, unexpected ALL, expecting FROM in: "delete all" sql>
Confirmed the issue on latest released version (Feb2013-SP3). At the same time,
DELETE FROM table;
works fine, so I would suggest using this. I removed the non syntax from the web page for now.
Best,
Hannes
_______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list