Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Deleting unused kdb+ analytic files in RedHat Post 303043287 by Neo on Thursday 23rd of January 2020 09:39:02 AM
Old 01-23-2020
OK. Good.

Before you can start deleting your DB files, you need to determine the recommended way kdb+/q recommends to truncate / trim the DB.

Do not do this by just removing files (yet); as this may not the proper way to truncate the DB tables (assume kdb+ has tables).

Have you looked into the docs on how to truncate tables (still assuming kdb+ has tables) in the DB?

Kdb+ for Developers - Limitless Big Data Applications | Kx
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting old files

Hi, I have a directory which contains files.This Directory keeps getting in new files from time to time.I want to maintain only 15 files in that directory at any time and the old files should be deleted. Eg: Directory 'c' @'a/b/c contains: 1_a 2_a 3_a... I want to delete all the old... (2 Replies)
Discussion started by: shiroh_1982
2 Replies

2. Programming

Analytic functions in Pro*c

Hi All, when I use the following analytic function in sql prompt, i am getting the result count(emp_no) over (partition by emp_no ) /* select count(emp_no) over (partition by emp_no ) from temp */ but when i use the same analytic function in Pro*c i get the following error Error... (2 Replies)
Discussion started by: quintet
2 Replies

3. Shell Programming and Scripting

Need help comparing two files and deleting some things in those files!

So I have two files: File1 pictures.txt 1.1 1.3 dance.txt 1.2 1.4 treehouse.txt 1.3 1.5 File2 pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244 dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1 treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies

4. Shell Programming and Scripting

AIX system.... deleting files in remote directory after retrieving files

Hi Friends, I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies

5. Shell Programming and Scripting

Deleting files

Hi all, I have developed a shell script to copy the files from source to destination and simultaneously to delete the copied files in source. I can copy the files but the files cannot be deleted in source side. (3 Replies)
Discussion started by: Venkatesan
3 Replies

6. AIX

Kdb - vscsi disk mapping from AIX 5.3 CLIENT side

If you're familiar with vscsi mappings thru a VIO Server, you are probably aware, on an AIX 6.1 Client LPAR, that: print cvai | kdbcan provide useful information to you.... like VIO Server name & vhost #. But, "cvai" does not appear to be part of the Kernel Debugger in AIX 5.3. My question is... (3 Replies)
Discussion started by: The Doctor
3 Replies

7. AIX

How to get the stack trace using kdb?

Hi All, I am trying to debug my core file using kdb. When I try to get the stack trace I am facing this error. core mapped from @ 700000000000000 to @ 70000000306fc04 Preserving 1680415 bytes of symbol table Dump does not start with valid magic number WARNING: Possibly truncated or... (2 Replies)
Discussion started by: Sachin1987
2 Replies

8. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies
TRUNCATE(7)							   SQL Commands 						       TRUNCATE(7)

NAME
TRUNCATE - empty a table or set of tables SYNOPSIS
TRUNCATE [ TABLE ] [ ONLY ] name [, ... ] [ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ] DESCRIPTION
TRUNCATE quickly removes all rows from a set of tables. It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM oper- ation. This is most useful on large tables. PARAMETERS
name The name (optionally schema-qualified) of a table to be truncated. If ONLY is specified, only that table is truncated. If ONLY is not specified, the table and all its descendant tables (if any) are truncated. RESTART IDENTITY Automatically restart sequences owned by columns of the truncated table(s). CONTINUE IDENTITY Do not change the values of sequences. This is the default. CASCADE Automatically truncate all tables that have foreign-key references to any of the named tables, or to any tables added to the group due to CASCADE. RESTRICT Refuse to truncate if any of the tables have foreign-key references from tables that are not listed in the command. This is the default. NOTES
You must have the TRUNCATE privilege on a table to truncate it. TRUNCATE acquires an ACCESS EXCLUSIVE lock on each table it operates on, which blocks all other concurrent operations on the table. If con- current access to a table is required, then the DELETE command should be used instead. TRUNCATE cannot be used on a table that has foreign-key references from other tables, unless all such tables are also truncated in the same command. Checking validity in such cases would require table scans, and the whole point is not to do one. The CASCADE option can be used to automatically include all dependent tables -- but be very careful when using this option, or else you might lose data you did not intend to! TRUNCATE will not fire any ON DELETE triggers that might exist for the tables. But it will fire ON TRUNCATE triggers. If ON TRUNCATE trig- gers are defined for any of the tables, then all BEFORE TRUNCATE triggers are fired before any truncation happens, and all AFTER TRUNCATE triggers are fired after the last truncation is performed. The triggers will fire in the order that the tables are to be processed (first those listed in the command, and then any that were added due to cascading). Warning: TRUNCATE is not MVCC-safe (see in the documentation for general information about MVCC). After truncation, the table will appear empty to all concurrent transactions, even if they are using a snapshot taken before the truncation occurred. This will only be an issue for a transaction that did not access the truncated table before the truncation happened -- any transaction that has done so would hold at least an ACCESS SHARE lock, which would block TRUNCATE until that transaction completes. So truncation will not cause any apparent inconsistency in the table contents for successive queries on the same table, but it could cause visible inconsistency between the contents of the truncated table and other tables in the database. TRUNCATE is transaction-safe with respect to the data in the tables: the truncation will be safely rolled back if the surrounding transac- tion does not commit. Warning: Any ALTER SEQUENCE RESTART operations performed as a consequence of using the RESTART IDENTITY option are nontransactional and will not be rolled back on failure. To minimize the risk, these operations are performed only after all the rest of TRUNCATE's work is done. However, there is still a risk if TRUNCATE is performed inside a transaction block that is aborted afterwards. For example, consider BEGIN; TRUNCATE TABLE foo RESTART IDENTITY; COPY foo FROM ...; COMMIT; If the COPY fails partway through, the table data rolls back correctly, but the sequences will be left with values that are probably smaller than they had before, possibly leading to duplicate-key failures or other problems in later transactions. If this is likely to be a problem, it's best to avoid using RESTART IDENTITY, and accept that the new contents of the table will have higher serial numbers than the old. EXAMPLES
Truncate the tables bigtable and fattable: TRUNCATE bigtable, fattable; The same, and also reset any associated sequence generators: TRUNCATE bigtable, fattable RESTART IDENTITY; Truncate the table othertable, and cascade to any tables that reference othertable via foreign-key constraints: TRUNCATE othertable CASCADE; COMPATIBILITY
The SQL:2008 standard includes a TRUNCATE command with the syntax TRUNCATE TABLE tablename. The clauses CONTINUE IDENTITY/RESTART IDENTITY also appear in that standard but have slightly different but related meanings. Some of the concurrency behavior of this command is left implementation-defined by the standard, so the above notes should be considered and compared with other implementations if necessary. SQL - Language Statements 2010-05-14 TRUNCATE(7)
All times are GMT -4. The time now is 03:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy