Hi Radovan, On 08/08/2013 09:15 AM, Hannes Mühleisen wrote:
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.
There is a workaround for now: sql>create table starships_copy as select * from starships with no data; sql>drop table starships; sql>create table starships as select * from starships_copy with no data; sql>select "location","count" from storage() where "table"='starships'; +-------------+-------+ | location | count | +=============+=======+ | 06/20/62007 | 0 | | 06/00/60077 | 0 | | 06/20/62032 | 0 | +-------------+-------+ ➜ acs ls -lah bat/06/00/60067.tail -rw------- 1 hannes da 0 Jul 19 09:15 bat/06/00/60067.tail Hope this helps. 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.