Analytics

turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

12-10-2013
08:54 AM

12-10-2013
08:54 AM

For AMP Number HASHMAP()+1

To find the number of Amps the query we use is -

Sel Hashmap()+1.

But why we add one saying "+1".

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

12-10-2013
10:45 AM

12-10-2013
10:45 AM

Re: For AMP Number HASHMAP()+1

Is there any HASHMAP function exist? I know only about HASHAMP function.

I believe its typo :), well I think it is due to the fact that the amp numbers start from 0 so if there are 100 amps, then the function will return 99, and you have to add 1 to get the correct number of amps.

Khurram

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

12-10-2013
06:52 PM

12-10-2013
06:52 PM

Re: For AMP Number HASHMAP()+1

Sorry! for the Typo. :)

another thoughts I come across from sites is that it is because one amp is not perticulerly use for table calculations as it handles the locking strategies.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

12-10-2013
10:40 PM

12-10-2013
10:40 PM

Re: For AMP Number HASHMAP()+1

Yes, the basic purpose of hashamp function is to analyse the row distriution base on PI values. The query used for this purpose is:

SELECT HASHAMP(HASHBUCKET(HASHROW(PI_COLUMN))) AS AMP, COUNT(*)

FROM TABLE

Group by 1

Order by 1

;

Khurram

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

12-11-2013
08:41 AM

12-11-2013
08:41 AM

Re: For AMP Number HASHMAP()+1

thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-03-2014
04:10 AM

07-03-2014
04:10 AM

Re: For AMP Number HASHMAP()+1

thanks for the infos.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

07-15-2014
02:57 AM

07-15-2014
02:57 AM

Re: For AMP Number HASHMAP()+1

We add '1' cause the AMP numbering starts from 0 (zero), not 1 (one).

If your system has 32 Amps, the amps are numbered from 0 to 31. HashAmp() gives the max amp number and you add 1 to find the total number of amps.