Hey Alex,
As described in the other thread, the cost of maintaining indexes matters
here, and there are other restrictions described in the documentation
<https://cloud.google.com/appengine/docs/java/datastore/projectionqueries#Java_Limitations_on_projections>.
I
hope this helps clarify the trade-offs for you.
Regards,
Nick
Cloud Platform Community Support
On Thursday, April 7, 2016 at 9:16:57 AM UTC-4, Alex Kerr wrote:
>
> Thanks Nick. So can you confirm costs are:
>
> 1.) For a projection query, cost is a single read for the entire query
> regardless of number of results returned (and same under the new Datastore
> pricing)
> 2.) For a projection query with distinct option, cost is 1 read + 1 read
> per entity retrieved
> 3.) For normal queries ("SELECT * FROM ... " in GQL) under the new (from
> July) Datastore pricing, cost is 1 read per entity
>
> Are there drawbacks to the suggestion made by the poster of that link you
> specified, in achieving a "SELECT * " at projection query cost, by adding
> in a dummy property to the entity kind and then doing a projection query on
> the remaining properties? (I suppose the obvious drawback being you'd need
> an index for every property)
>
> Thanks,
> Alex
>
>
> On Thursday, April 7, 2016 at 12:31:22 AM UTC+1, Nick (Cloud Platform
> Support) wrote:
>>
>> Hi Alex,
>>
>> I believe this old App Engine Groups thread
>> <https://groups.google.com/forum/#!msg/google-appengine/iL9ci30WSxU/0vLuvv8fAwAJ>
>>
>> answers your question adequately. Let me know if you have any questions
>> after reading.
>>
>> Cheers,
>>
>> Nick
>> Cloud Platform Community Support
>>
>> On Wednesday, April 6, 2016 at 10:12:15 AM UTC-4, Alex Kerr wrote:
>>>
>>> Hi,
>>>
>>> Can anyone clarify the cost of projection queries please? (both in
>>> operations and financially)
>>>
>>> Datastore pricing page at:
>>> https://cloud.google.com/datastore/docs/pricing says a regular query
>>> (is that "SELECT * " ?) is 1 read + 1 read per entity retrieved. I get
>>> that, but then projection queries are just "1 read" - which implies a cost
>>> of 1 read total regardless of the number of results returned and the number
>>> of properties projected - that can't be right?
>>>
>>> Also I note the new pricing section from July but still not clear on
>>> projection query cost!
>>>
>>> Many thanks
>>> Alex
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/9fcf6b2c-2e82-4575-826d-521985502d0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.