Please help me out reg syb15 query


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Please help me out reg syb15 query
# 1  
Old 01-19-2010
Please help me out reg syb15 query

When i run the below query in syb15 (with syb 12.5.X backward compatibilty) environment it runs 45min where as the same in syb12.5.1 it takes only 7-10min.

But the main thing is stld_date(in the below query) does not covered in the index of that table. Also main_table is a huge table. So is it because of index for that column? . Can any one please provide ur suggestion to
change the query so i can get the response very fast like 7-10min but witout creating index we have to get the quciker result.

Even i tried the SET FORCEPLAN ON option but not worked out.
Code:
----------------------------------------
select
co1,col2, col3,
col4, col5, col6,
col7, col8,col9
col10,col11,col12,col13,col14,col15,col16
from acct_table b(index idx_acct),
main_table m(index idx_main)
where b.acctno=m.acctno
and b.acctno like '00%'
and b.stld_date >= @curnt_date
and b.stld_date <= @end_date
--------------------------------------------------
whereas @curnt_date = current date
@end_date = current date + 8 days
acct_table has only acct nos(acct starts with 00 and 11 but we need only 00)


---------- Post updated at 01:30 PM ---------- Previous update was at 09:33 AM ----------

Can any one please a solution from question

Last edited by prsam; 01-19-2010 at 05:41 PM.. Reason: Code tags, PLEASE!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

2. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

3. UNIX and Linux Applications

Syb15 Query takes longer, help me out

When i run the below query in syb15 (with syb 12.5.X backward compatibilty) environment it runs 45min where as the same in syb12.5.1 it takes only 7-10min. But the main thing is stld_date(in the below query) does not covered in the index of that table. Also main_table is a huge table. So is it... (1 Reply)
Discussion started by: prsam
1 Replies

4. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

5. Solaris

Reg. VXVM

Hi Guys, I have a doubt either to Reboot the server after Replacing the disk0. I have two disks under vxvm root mirrored and i had a problem with primary disk so i replace the disk0 failed primary disk and then mirrored. After mirroring is it reboot required ? (7 Replies)
Discussion started by: kurva
7 Replies

6. Solaris

Reg: ZONES

HI Friends, What is the min. Requirement to install Solaris ZONEs, i am using INTEL PC at home and i allready installed Solaris 10 can i configure ZONES in it, and i want to know the basic information of ZONES. Thanks in Advance. (3 Replies)
Discussion started by: kurva
3 Replies

7. Shell Programming and Scripting

Reg Ex question

Hi All, If I had a string that was a combination of plain text and quoted text - For ex String: This "sentence is" a combination of "multiple words" I wanted to know how I can write a reg-ex that splits the above string into the following result = This result = sentence is result = a... (7 Replies)
Discussion started by: garric
7 Replies

8. UNIX for Dummies Questions & Answers

Reg: Query in sed

Hi Penchal, I would appreciate if you can provide me a brief explanation on what you are trying to do in the commnad below. echo "6-9-2008" | sed 's/\(.\)-\(.\)-\(.*\)/\3-0\2-0\1/g' Thanks Amit (1 Reply)
Discussion started by: patelamit009
1 Replies

9. SCO

reg:rm -R is not working

I am installing the my package in SCO unix 5.0 .so it will create some temporary directories and files and same will delete.So , 'rm -R ' is not working in system .in the package only it has given this command,so now without this command working we can not go forward. so kindly help in this... (1 Reply)
Discussion started by: mokri_1980
1 Replies

10. UNIX for Advanced & Expert Users

query reg semaphore / processes on solaris

Our Baan application has a server process bflusher which is activated automaticaly by another server process bmanager . These processes uses shared memory to carry out it's operations . Through a baan application query command (tbase6.1 P d 3 ) , i can find the number of users (user process... (1 Reply)
Discussion started by: Hitesh Shah
1 Replies
Login or Register to Ask a Question