Hello all,
I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction.
Here's the problem.
I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines... (4 Replies)
Hi guys
I have a need to compress the contents of a directory while I am copying data into it. I was able to do this when it was only one file by doing as below:
STEP1: mknod myfile p
STEP2: chmod 777 myfile
STEP3: compress -v < myfile > myfile.Z &
STEP4: cp -p xyz_file myfile... (2 Replies)
Hii friends,
I am a newbie to unix/shell scripting and got stuck in implementing a functionality.Dear experts,kindly spare some time to bring me out of dark pit :confused:..
My requirement is somewhat wierd,let me explain what i have and what i need to do...
1) there are several excel... (1 Reply)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Hello, i'm new to the forum and so am i to C programming.
Recently i've gotten a task to create a program that will read an existing .bin file and copy the data to a non existing (so i have to create it) .txt file (some type of conversion)
Now, i now how to put the arguments, opening and... (5 Replies)
I have the following that I'd like to do:
1. I have split a file into separate files that I placed into the /tmp directory. These files are named F1 F2 F3 F4.
2. In addition, I have several directories which are alphabetized as dira dirb dirc dird.
3. I'd like to be able to copy F1 F2 F3 F4... (2 Replies)
Hello people,
I have a question regarding transferring data from one file server to another.
The server is a Solaris 9 box
The old file server is connected via Ethernet cable, and the new file server we are switching is a Fiber channel.
can I use the
dd if=server:/app1 of=server2:/app1
... (2 Replies)
Hi,
I have a large number of data files each containing simple integers from 1 to around 25000 in ascending order. However, they are not in a specific progression; some numbers are missing in each file.
For ex. datfile1 may have the numbers in order 1 2 4 6 7 8 12 ... 24996 24999
while datfile2... (8 Replies)
I need to perform operation as captioned.
I found out USB CD Drive is attached, by running 'lsusb' command.
I am trying to identify mechanism by which I could mount this USB CD drive to disk. After which I expect to copy the contents.
Could anyone indicate how this could be performed ? (3 Replies)
I need to fix an SQL statement in MySQL that should calculate a field using values from two of the columns and I prefer to do this using set-based programming, ie not procedural. What needs to happen is that in a separate column called "delta" the value of "level" is copied depending on whether... (3 Replies)
Discussion started by: figaro
3 Replies
LEARN ABOUT REDHAT
cluster
CLUSTER(7) SQL Commands CLUSTER(7)NAME
CLUSTER - cluster a table according to an index
SYNOPSIS
CLUSTER indexname ON tablename
INPUTS
indexname
The name of an index.
table The name (possibly schema-qualified) of a table.
OUTPUTS
CLUSTER
The clustering was done successfully.
DESCRIPTION
CLUSTER instructs PostgreSQL to cluster the table specified by table based on the index specified by indexname. The index must already have
been defined on tablename.
When a table is clustered, it is physically reordered based on the index information. Clustering is a one-time operation: when the table is
subsequently updated, the changes are not clustered. That is, no attempt is made to store new or updated tuples according to their index
order. If one wishes, one can periodically re-cluster by issuing the command again.
NOTES
In cases where you are accessing single rows randomly within a table, the actual order of the data in the heap table is unimportant. How-
ever, if you tend to access some data more than others, and there is an index that groups them together, you will benefit from using CLUS-
TER.
Another place where CLUSTER is helpful is in cases where you use an index to pull out several rows from a table. If you are requesting a
range of indexed values from a table, or a single indexed value that has multiple rows that match, CLUSTER will help because once the index
identifies the heap page for the first row that matches, all other rows that match are probably already on the same heap page, saving disk
accesses and speeding up the query.
During the cluster operation, a temporary copy of the table is created that contains the table data in the index order. Temporary copies of
each index on the table are created as well. Therefore, you need free space on disk at least equal to the sum of the table size and the
index sizes.
CLUSTER preserves GRANT, inheritance, index, foreign key, and other ancillary information about the table.
Because the optimizer records statistics about the ordering of tables, it is advisable to run ANALYZE on the newly clustered table. Other-
wise, the optimizer may make poor choices of query plans.
There is another way to cluster data. The CLUSTER command reorders the original table using the ordering of the index you specify. This can
be slow on large tables because the rows are fetched from the heap in index order, and if the heap table is unordered, the entries are on
random pages, so there is one disk page retrieved for every row moved. (PostgreSQL has a cache, but the majority of a big table will not
fit in the cache.) The other way to cluster a table is to use
SELECT columnlist INTO TABLE newtable
FROM table ORDER BY columnlist
which uses the PostgreSQL sorting code in the ORDER BY clause to create the desired order; this is usually much faster than an index scan
for unordered data. You then drop the old table, use ALTER TABLE...RENAME to rename newtable to the old name, and recreate the table's
indexes. However, this approach does not preserve OIDs, constraints, foreign key relationships, granted privileges, and other ancillary
properties of the table --- all such items must be manually recreated.
USAGE
Cluster the employees relation on the basis of its ID attribute:
CLUSTER emp_ind ON emp;
COMPATIBILITY
SQL92
There is no CLUSTER statement in SQL92.
SQL - Language Statements 2002-11-22 CLUSTER(7)