Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

How to choose right key to reach the best performace of get() method.

3 replies [Last post]
  • Login or register to post comments
Thu, 12/06/2012 - 23:46
dew_ice
Offline
Joined: 09/05/2012
Groups: None

If we suppose that suitation:

we want to save student_number(long) and teacher_number(long) into CB.
both number are in [1,10000].
To make the key unique, we should add some prefix or postfix with the number.

then we will have 2 choices:
choice A: let the key as 'student_prefix_' + student_number, 'teacher_prefix_' + teacher_number;
choice B: let the key as student_number + '_student_postfix', teacher_number + '_teacher_postfix';

which choice can get better performance for get() function? and why ?

thanks!

Top
  • Login or register to post comments
Sun, 12/09/2012 - 19:45
dew_ice
Offline
Joined: 09/05/2012
Groups: None

Anyone who can share your experience?
Thanks.

Top
  • Login or register to post comments
Mon, 12/10/2012 - 10:29
Dronz
Offline
Joined: 09/17/2011
Groups: None

The performance statistics for Couchbase server look very good, so for most all purposes I think the recommendation is to use whatever makes most sense to you, rather that to try to improve performance with the key choice.

However I can see there could be cases where maximum computation speed would be wanted, so you could do some time tests to see if you can even measure an effect of longer versus shorter key names.

Top
  • Login or register to post comments
Thu, 12/13/2012 - 01:45
dew_ice
Offline
Joined: 09/05/2012
Groups: None

Thanks for the info.

Dronz wrote:
The performance statistics for Couchbase server look very good, so for most all purposes I think the recommendation is to use whatever makes most sense to you, rather that to try to improve performance with the key choice.

However I can see there could be cases where maximum computation speed would be wanted, so you could do some time tests to see if you can even measure an effect of longer versus shorter key names.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker