Sponsored Content
Top Forums Shell Programming and Scripting piping oracle output to a file? Post 302176758 by kwliew999 on Wednesday 19th of March 2008 05:26:26 AM
Old 03-19-2008
Oracle Analytical Processes

Sorry for posting some Oracle related question in this forum as I don't know if any other place that I can post the question. I am sure there are many of you familiar with Oracle database and can answer my question.
My DBA recently written a analytic script to perform a table space analyse as well as reform of indexes in order to have a better performance on some application processes. The scripts that written by him is as follow :
======================
Analyze table GNMM_INTEREST_RATE_MASTER estimate statistics for table for all indexes for all indexed columns;
Analyze table PS_INTEREST_TRANSACTION_TEMP estimate statistics for table for all indexes for all indexed columns;
Analyze table PSDT_APL_TRANSACTION_BREAKUP estimate statistics for table for all indexes for all indexed columns;
Analyze table PSMT_CLEARANCE_MASTER estimate statistics for table for all indexes for all indexed columns;
Analyze table PSDT_CLEARANCE_DETAILS estimate statistics for table for all indexes for all indexed columns;
===========================
I can run the script on AIX platform with Oracle priviledge. And the application process run after the script will have a very much improve performance.

I have also found another scripts written by some other DBA from other company who claimed that is the same as the one I stated above. The scripts are as below :
=======================
create or replace
procedure BFN_ANALYZE_INT_ACCTABLES is

Begin
dbms_stats.gather_table_stats( ownname => 'PROD',
tabname => 'gnmm_interest_rate_master',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all indexed columns size auto',
cascade => true,
degree => 7
) ;
dbms_stats.gather_table_stats( ownname => 'PROD',
tabname => 'PS_INTEREST_TRANSACTION_TEMP',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all indexed columns size auto',
cascade => true,
degree => 7
) ;
dbms_stats.gather_table_stats( ownname => 'PROD',
tabname => 'PSDT_APL_TRANSACTION_BREAKUP',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all indexed columns size auto',
cascade => true,
degree => 7
) ;
dbms_stats.gather_table_stats( ownname => 'PROD',
tabname => 'PSMT_CLEARANCE_MASTER',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all indexed columns size auto',
cascade => true,
degree => 7
) ;
dbms_stats.gather_table_stats(ownname => 'PROD',
tabname => 'PSDT_CLEARANCE_DETAILS',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all indexed columns size auto',
cascade => true,
degree => 7
) ;
END BFN_ANALYZE_INT_ACCTABLES ;
====================================

I found that the above script doesn't have the same effect as the previous one which will improve performance of application processes.

Please advise whether the 2 scripts are similar or any differences that limited the performance?

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Piping output to while read

Hi. Im using cat to output the contents of a file, then piping it to my while read loop.In this loop variables get assigned values. However when i try to use the variables outside the loop their values has been reset.I understand about subshells etc. but I have no idea how to "preserve" the... (3 Replies)
Discussion started by: Ultimodiablo
3 Replies

2. UNIX for Dummies Questions & Answers

piping the output of find command to grep

Hi, I did not understand why the following did not work out as I expected: find . -name "pqp.txt" | grep -v "Permission" I thought I would be able to catch whichever paths containing my pqp.txt file without receiving the display of messages such as "find: cannot access... Permisson... (1 Reply)
Discussion started by: 435 Gavea
1 Replies

3. Shell Programming and Scripting

piping output to echo

Hi, I was wondering why ls * | echo does not print the contents of the directory to the screen? The way I see it, ls * returns a whole lot of information, and then we pipe all this info to echo, so surely it should all come to our screen! Is there a serious flaw in my understanding? ... (3 Replies)
Discussion started by: A1977
3 Replies

4. Shell Programming and Scripting

piping output of tail running in background

Not sure why this does not work in bash: tail -f err.log |& -bash: syntax error near unexpected token `&' I am attempting to continuously read a file that is being updated by doing a "tail -f" on the file and piping the output to stdin which can then be read by the next shell command Thnx (4 Replies)
Discussion started by: anuramdas
4 Replies

5. Shell Programming and Scripting

piping output from PHP file into variable

Hi. I have a script like so: #!/bin/bash download='php /var/www/last.php' echo $download if $downloadHow do I pipe the output of the php file into a variable, as when i run the if statement, it just echos the file output to the screen and does not actually consider the output (it will be... (2 Replies)
Discussion started by: daydreamer
2 Replies

6. Shell Programming and Scripting

Piping and assigning output to a variable in Perl

Hi All, I am trying to convert the below Csh code into Perl. But i have the following error. Can any expert help ? Error: ls: *tac: No such file or directory Csh set $ST_file = `ls -rt *$testid*st*|tail -1`; Perl my $ST_file = `ls -rt *$testid*st*|tail -1`; (10 Replies)
Discussion started by: Raynon
10 Replies

7. Fedora

Piping output of "top" to a text file

I would like to pipe "top -n" to a text file, but I get an error: top: cannot open /dev/kmem kvm_open: Permission denied I am a non-root user. If I could find a way to get this type of output: "Memory: 2048M real, 1516M free, 4099M swap free" into a text file, I could further automate... (13 Replies)
Discussion started by: safraser
13 Replies

8. Shell Programming and Scripting

need help piping the output from an app... uh, yeah...

Ok, so there is a perl script that runs as a server, on my local host. It tells me which port to use. I want to pipe that output into my browser so I can do the whole thing with a single command. The problem is, I think, that the program doesn't actually exit cause it's running a server, so...... (6 Replies)
Discussion started by: ninjaaron
6 Replies

9. Shell Programming and Scripting

Piping output of ls to a text file

Basically I was wondering if any of you know how to pipe the output of ls to a text file? so in my shell script one of the lines is ls but i want to pipe it into a file called directory listing. Cheers. I have tried ls | Directorylisting.txt but it keeps saying " line 7: DirectoryListing.txt:... (9 Replies)
Discussion started by: LinuxNubBrah
9 Replies

10. Shell Programming and Scripting

Abnormality while piping tr command output to sed

i have a file seperated each line seperated by newline. For example alpha beta gamma i am trying to replace the newlines to "," but dont want , present at the end of the line so i am trying the below one liner . but not sure whats wrong but its not working cat myfile | tr -s '\n' ',' | sed... (9 Replies)
Discussion started by: chidori
9 Replies
Alzabo::Index(3pm)					User Contributed Perl Documentation					Alzabo::Index(3pm)

NAME
Alzabo::Index - Index objects SYNOPSIS
foreach my $i ($table->indexes) { foreach my $c ($i->columns) { print $c->name; print '(' . $i->prefix($c) . ')' if $i->prefix($c); } } DESCRIPTION
This object represents an index on a table. Indexes consist of columns and optional prefixes for each column. The prefix specifies how many characters of the columns should be indexes (the first X chars). Some RDBMS's do not have a concept of index prefixes. Not all col- umn types are likely to allow prefixes though this depends on the RDBMS. The order of the columns is significant. METHODS
columns Returns an ordered list of the "Alzabo::Column" objects that are being indexed. prefix ("Alzabo::Column" object) A column prefix is, to the best of my knowledge, a MySQL specific concept, and as such cannot be set when using an RDBMSRules module for a different RDBMS. However, it is important enough for MySQL to have the functionality be present. It allows you to specify that the index should only look at a certain portion of a field (the first N characters). This prefix is required to index any sort of BLOB column in MySQL. This method returns the prefix for the column in the index. If there is no prefix for this column in the index, then it returns undef. unique Returns a boolean value indicating whether the index is a unique index. fulltext Returns a boolean value indicating whether the index is a fulltext index. function For function indexes, this returns the function being indexed. id The id is generated from the table, column and prefix information for the index. This is useful as a canonical name for a hash key, for example. Returns a string that is the id which uniquely identifies the index in this schema. table Returns the "Alzabo::Table" object to which the index belongs. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Index(3pm)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy