Well, the query it's bit complex, if I would be able to write it sql
should be something like:
SELECT *
FROM
myTable
WHERE
lat > 99 and lat < 101 and
lng > 9 and lat < 11 and (
tags IN ('Tag1','Tag2','TagN') OR
prop1 IN (1,34,754,234) OR
prop2 IN (432,564,334)
)
LIMIT 0,20
So at the moment I'm implementing the " ... IN ... OR ... IN ... OR
... IN ... " by retrieving the keys in 3 different queries (and i
found the problem described in this email) put them together in one
list.
Then perform the real query by using "__key__ IN :1 " and lat and lng
i create a very simple geohash to avoid to parse lat and lng all via
python.
Honestly i don't know if i will have performance problems becasue the
app is still on dev and i don't have real data, and also because it's
my 20th day ever on GAE and i haven't finish to read "Mastering the
datastore"... yet :P
If you keen I will let you know how this story finish :)
On 27 January 2011 12:42, Stephen Johnson <[email protected]> wrote:
> I don't know the python api, but hopefully you can do it in an asynchronous
> fashion to save some latency time.
>
> On Wed, Jan 26, 2011 at 5:51 PM, Cesare Montresor
> <[email protected]> wrote:
>>
>> So it's actually a bug in the python implementation of Query/GqlQuery ?
>>
>> At the end of the day I was in need of the IN operator, that under the
>> hood split the query anyway, so there is not much difference in doing
>> it in code... I just could save some loops, maybe, and for sure some
>> headaches :)
>>
>> PS: Java is my most love/hate language and I definitely don't own it :(
>>
>>
>> On 27 January 2011 11:42, Stephen Johnson <[email protected]> wrote:
>> > Not sure how it does it under the hood so to speak, but JDO allows this.
>> > +1
>> > for Java :)
>> >
>> > On Wed, Jan 26, 2011 at 5:30 PM, Cesare Montresor
>> > <[email protected]> wrote:
>> >>
>> >> Hi Shinichi,
>> >> good to know that I'm not the only one that noticed and though "lol,
>> >> why??" :)
>> >>
>> >> Cheers
>> >>
>> >> On 27 January 2011 11:18, Shinichi Nakanishi <[email protected]>
>> >> wrote:
>> >> > Issue 2018: keys_only queries improvement:
>> >> > http://code.google.com/p/googleappengine/issues/detail?id=2018
>> >> >
>> >> > On Wed, Jan 26, 2011 at 16:12, Stephen Johnson
>> >> > <[email protected]>
>> >> > wrote:
>> >> >> Keys only queries do not support IN or != filters.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups "Google App Engine" group.
>> >> > To post to this group, send email to
>> >> > [email protected].
>> >> > To unsubscribe from this group, send email to
>> >> > [email protected].
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/google-appengine?hl=en.
>> >> >
>> >> >
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "Google App Engine" group.
>> >> To post to this group, send email to [email protected].
>> >> To unsubscribe from this group, send email to
>> >> [email protected].
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/google-appengine?hl=en.
>> >>
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Google App Engine" group.
>> > To post to this group, send email to [email protected].
>> > To unsubscribe from this group, send email to
>> > [email protected].
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-appengine?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.