In order to speed up the query you should consider adding an index (or indexes).
What index you should add, depends on your data: you should start by indexing the most selective column(s) used in the where clause.
I would start with something like this:
You should consider indexing only subset of the data, if that subset is selective.
You should also consider the space needed for your indexes and their impact on the DML operations.
If the query is slow after indexing (some of) the columns in the where clause, post the output of the following statement:
I would verify the performance of both versions (in vs outer join) after creating the indexe(s).
Could you post also the output of the following command:
Hello
I would like to perform a select from a oracle table and return those values to my shell script
For example:
site=head -1 $infile | cut -c1-15 | awk '{printf "s%", $0}
sqlplus -s /nolog |& #Open pipe to sql
select col1, col2, col3, col4
from oracle_table
where col5 =... (6 Replies)
Hi,
I have about 12 columns and 15 rows to be retrived from sybase isql command through unix. But when i output the sql into a file and see it, the formatting is going for a toss. can someone please suggest how can i get the result correctly in the output file ?
Thanks,
Sateesh (2 Replies)
I have following.
.
.
.
$userid = 2
.
$query = "select username from users where userid = ".$userid.";";
.
$username = $line;
$data="Some Data Here";
.
$query = "insert into logger (username, data) valuse ($username, $data);";
.
I would like to not have 2 database calls. (3 Replies)
Dear All ,
I have file1.txt contain values like the following:
----------
23
24
25
and I have shell script which has the following :
more file1.txt | awk '{print "select 'DUMP',CODE1||'|'||CODE2||'|'||CODE3 from CODE where CODE1='" $1 "';"}' > file2.sql
all I need is to have the... (6 Replies)
count.sh#!/bin/ksh
SQL1=`sqlplus -s usr/pwd @count.sql $1 $2 $3`
SQL2=`sqlplus -s usr/pwd @selectall.sql $1 $2 $3`
LIST="Count Select_All"
select i in $LIST
do
if
then
echo $SQL1
elif
then
echo $SQL2
fi
done (2 Replies)
Hi there
I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this
SN=123456
n=server1
m=x4140
sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';"
echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
Hello people,
as wrote in title I'm going crazy with a "complex" SQL select.
This is the seelct:
select T_ADDRESS, T_MCC,T_MNC,T_MSIN,T_IM_MNC, COUNT(*) FROM TABLETEST
WHERE T_MCC=123 AND (T_MNC=11 OR T_MNC=01)
GROUP BY T_ADDRESS,T_MCC,T_MNC,T_MSIN,T_IM_MNC HAVING count(*) > 5;This select... (7 Replies)
Hi All,
I had a query related to sql select update replace command.
i have a table named clusters and it looks like this
name model characteristics
sample1.1 +123 parent
sample1.2 -456 clone
sample1.3 +122 ... (5 Replies)
Hi All,
I had a query related to sql select replace command.
i have a table named clusters and it looks like this
Code:
name characteristics
sample 1.1 parent
sample 1.2 ... (2 Replies)
Hi Forum.
Need your expertise on the following question.
I have the following file which I would like to parse, find first block of SELECT statment and concatenate all input fields as 1 field (~ delimited):
Old File:
SELECT /*+ USE_HASH(CCOMM ICAR IMAP IAS IP IMAS IMPS IAP SPCA) */
... (5 Replies)
Discussion started by: pchang
5 Replies
LEARN ABOUT OSX
xcodeindex
XCODEINDEX(1) BSD General Commands Manual XCODEINDEX(1)NAME
xcodeindex -- indexes Xcode projects
SYNOPSIS
xcodeindex [-project projectname] [-configuration configurationname] [-quiet] [-destPath path] [-loglevel level] [indexaction ...]
xcodeindex -version
xcodeindex -help
DESCRIPTION
xcodeindex indexes an Xcode project.
Usage
Run xcodeindex from the directory containing your project (i.e. the directory containing the projectname.xcode package). If you have multiple
projects in the this directory you will need to use -project to indicate which project should be indexed.
By default, xcodeindex updates the project index if it exists, otherwise it creates a new index.
Options
-project projectname
Index the project specified by projectname. Required if there are multiple project files in the same directory.
-configuration configurationname
Use the build configuration specified by configurationname when indexing the project. If none is specified, the active configuration is
used.
-quiet
Suppresses all logging while indexing.
-destPath path
Places the project index in the directory specified by path.
-loglevel level
Turns on varying degrees of indexing debugging. The level range is from zero to six, enabling a staggered number of the existing index-
ing defaults for the indexer. If an option greater than six is used, then the maximum level of logging is enabled. The logging levels
are defined as:
0 No logging
1 Prints the name of the file being indexed. This is the default logging level.
2 File processing output
3 Symbol updating output
4 Symbol insertion and creation output
5 Parser basic output
6 Parser error output
The levels are inclusive (thus enabling log level 4 would also automatically include levels 1, 2, and 3). Output from higher logging
levels than the default (level 1) is not expected to be useful for most developers, but could be valuable in troubleshooting cases
where there is a problem with indexing a particular Xcode project.
indexaction ...
Specify an index action (or actions) to perform on the project. Available build actions are:
clean Removes the index for the project.
build Updates the index for the project, creating it if necessary. This is the default index action.
stats Prints the statistics for the index (number of classes, etc)
dump Dumps a tab-delimited format of the index (for major symbols - classes, methods, etc) to stdout
-version
Displays component version numbers for xcodeindex. These can be compared to the version numbers in the Xcode application's About Xcode
window.
-help
Displays usage information for xcodeindex.
EXAMPLES
xcodeindex clean
Cleans the index.
xcodeindex -project FirstProject -project SecondProject -project ThirdProject -configuration Debug -quiet
Indexes three projects using the Debug configuration and suppresses all logging.
Mac OS X September 16, 2008 Mac OS X