And to keep replying to myself:

This one is slow:
x=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= 
%s",[u'TO1'])
print x[0]

This one is fast:
y=Marker.objects.raw("SELECT * from PROD_SCHEMA.MARKER WHERE MARKID= 'TO1'")
print y[0]

If I copy the table and make the  MARKID field in NVARCHAR2(20), then it 
uses the index properly on both counts

So... so do I make django use ascii? is there a field type?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/50ce32f1-90ac-4290-a950-ed70c7e9692b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to