Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Python client very slow

5 replies [Last post]
  • Login or register to post comments
Thu, 01/10/2013 - 14:35
Me
Offline
Joined: 01/09/2013
Groups: None

I came to Couchbase because I was expecting sub millisecond, but the Python client gives me an average of about 3 milliseconds. Is the Python client known to be slow? I come from MongoDB and it gave me an average speed of 500 microseconds.

I have a Couchbase bucket with just one entry (30 bytes) and queried by the key. Configs are default.

Top
  • Login or register to post comments
Fri, 01/11/2013 - 11:06
john
Offline
Joined: 01/05/2012
Groups: None

Could you post the code that you're using?

Top
  • Login or register to post comments
Fri, 01/11/2013 - 11:45
Me
Offline
Joined: 01/09/2013
Groups: None

Simple get

from couchbase.client import Couchbase
couchbase = Couchbase("127.0.0.1:8091", "s", "")
bucket = couchbase["s"]
one = time.time()
bucket.get("test") # returns: {"domain":4,"nextcrawlglobal":5}
two = time.time()
three = two - one
print three # returns like 0.003

and a view takes like 40 ms:
view = bucket.view("_design/search/_view/getdomains", limit=10)

View, Map:
function (doc, meta) {
emit([doc.domain, doc.nextcrawlglobal]);
}

Couchbase bucket has 3 documents in it. (I thought Couchbase tries to keep them in RAM, tho I know Views are on disk, but 40ms is way too long)

Top
  • Login or register to post comments
Fri, 01/11/2013 - 12:50
john
Offline
Joined: 01/05/2012
Groups: None

Unfortunately, at this time the Python client is pre-release. Performance is the primary development focus as it moves towards 1.0. You're using the client as it is intended to be used - I saw similar results.

Couchbase will keep documents in RAM (provided it has space). Clearly, with 3 documents, you no doubt have enough RAM.

Top
  • Login or register to post comments
Sat, 01/12/2013 - 08:22
Me
Offline
Joined: 01/09/2013
Groups: None

That's too bad. The Python client is the only client I got working correctly after some time.

Top
  • Login or register to post comments
Tue, 01/22/2013 - 23:12
juliarobert
Offline
Joined: 01/22/2013
Groups: None

Interesting information. I like your topic. Thanks for sharing it.
testking exam questions//ccna dumps download practice test//ccna exploration companion guide practice test//ccna online exam practice test//

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