If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Adabas > Indexing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-25-11, 05:57
Prayank Prayank is offline
Registered User
 
Join Date: Feb 2011
Posts: 6
Indexing

Hi,

Can somebody help me with Indexing. For e.g. I have a data sheet with

Airline Name (Col A), Sector Traveled (Col B) and Nett Payable (Col C) and then data in all rows.


Airline Name Sector Encoded Nett Pay
Kingfisher Delhi-Bhubaneswar 5633
Kingfisher Delhi-Bhubaneswar 5633
Kingfisher Delhi-Bhubaneswar 5633
Kingfisher Bhubaneswar-Delhi 5383
Kingfisher Bhubaneswar-Delhi 5383
Kingfisher Bhubaneswar-Delhi 5383
Indigo Airlines Bhubaneswar-Delhi 5057
Indigo Airlines Bhubaneswar-Delhi 5057
Indigo Airlines Delhi-Bhubaneswar 6073
Indigo Airlines Delhi-Bhubaneswar 9534
Kingfisher Kolkata-Raipur 5198
Jet Airways Raipur-Delhi 4068
Indigo Airlines Delhi-Bhubaneswar 6373
Kingfisher Bhubaneswar-Delhi 5383
Spice Jet Delhi-Gauhati 795
Kingfisher Delhi-Bhubaneswar 5633
Kingfisher Bhubaneswar-Delhi 5383
Jet Airways Delhi-Nagpur 840
Air India Delhi-Hyderabad 8745
Indigo Airlines Vadodara-Delhi 3413
Jet Airways Delhi-Vadodara 7149
Air India Nagpur-Delhi 4281
Spice Jet Delhi-Nagpur 4014
Jet Airways Delhi-Jodhpur 7059
Kingfisher Mumbai-Bangalore 4709
Jet Airways Bangalore-Mumbai 3359
Indigo Airlines Delhi-Ahmedabad-Delhi 8775
Air India Delhi-Raipur 6222
Indigo Airlines Delhi-Lucknow-Delhi 1680
Indigo Airlines Delhi-Bangalore 5705

How can I create a table which would pick common text (Airline Names) and summarize the Nett Pay??

Airline Name Nett Pay
Kingfisher 378041
Jet Airways 540244
Go Air 17746

Regards
Reply With Quote
  #2 (permalink)  
Old 07-25-11, 09:17
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
for this query I'd want an index on airline name

I'd want to use the 'sum' clause
I'd want to use the 'group by' clause

id you want to understand the difference between indexing the airline name column then create the query without the indexes and use the explain prefix before and after creating the index and see what effect it has on the queries performance
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On