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 > Sybase > Histogram

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-22-11, 11:11
regtha regtha is offline
Registered User
 
Join Date: Jan 2010
Posts: 72
Histogram

What is meant by histogram and what is the best range of values for this? and how it will be used?
Reply With Quote
  #2 (permalink)  
Old 02-23-11, 11:14
farhy farhy is offline
Registered User
 
Join Date: Aug 2010
Posts: 19
the histogram is a principle to describe data in a table,

let say you have a table with the following data:

1 1 1 2 3 3 4 4 4 5 6 7 8 9 9 9 9 9 9 9

now we create simple histogram:
max nr_of_records meaning
2 4 there are 4 records with the value 2 or smaller
4 5 there are 5 records between 2 and 4
9 6 there are 6 records beween 5 and 9

this is very simple histogram, based on this the query optimizer can choose a "good" plan to execute.

lets say you have a table with just 2 Values:

1 which occurs just once and
2 which occurs 1 000 000 00 times.

with a proper histogram / statistics the optimizer will decide to use an index on the table for the value 1
and a full table scan for the value 2.
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