You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-dr...@lists.datastax.com
Hi there, I'm using the python driver for a django app. My column_family has 1M registries aprox.
Each simple query takes 10 secs and it's a simple one, by PK should't take so long. When I execute the query via cqlsh it takes a few miliseconds, very fast.
This is the method where I try to execute the query:
def execute(self, cql, kargs):
res = self.get_session().execute(cql, kargs)
return res
and the query looks like:
select * keyspace.from cfname where id=12334343;
Thanks!
Adam Holmberg
unread,
Dec 9, 2014, 6:36:48 PM12/9/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-dr...@lists.datastax.com
I don't see anything unusual with the small amount of Python you showed. Curious, what's inside of 'self.get_session()'?
I'm assuming the malformed query is just a typo.
We may need a little more information about your Cassandra/cqlsh and driver versions, data model, and surrounding code, to help out.
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-dr...@lists.datastax.com
We just found out the problem (I think), had to add max_schema_agreement_wait=0.01 on initialize... that helped with speed, also we configured cluster.set_core_connections_per_host(HostDistance.LOCAL, 1).
The problem is the connect, each connect takes more than 10 secs...
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-dr...@lists.datastax.com
max_schema_agreement_wait only comes into play when modifying schema. Are you changing schema often?
Regarding connect time: 10s is surprisingly high. Independent of possible network issues, this should not really affect a discussion of query execution if your session is long-lived (i.e. you would not typically be creating many sessions in an application).
Adam
Martin Brambati
unread,
Dec 10, 2014, 11:33:52 AM12/10/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-dr...@lists.datastax.com
Yes, one session only (Singleton), and I really don't know why it takes so long. The initial topic should be changed to "cluster.connect speed problem".