Hi Ravi,
  If you are ordering on something, you'll hit a problem with
exploding indexes.  You would wind up with additional indexes on
(allKey, the order prop), (allKey, allKey, the order prop), , (allKey,
allKey, allKey, the order prop), and (allKey, allKey, allKey, allKey,
the order prop).  That translates to a lot of index _rows_ per entity.

  
http://code.google.com/appengine/docs/java/datastore/queries.html#Big_Entities_and_Exploding_Indexes
  http://code.google.com/appengine/articles/index_building.html


  You can search the groups for more discussions about this general topic.



Robert






On Tue, Feb 1, 2011 at 11:44, Ravi <[email protected]> wrote:
> Hi,
> I have 2-3 properties(Unowned Relationship keys) in my class which i will be
> using in where clause to filter records.
>
> Class PropertyAd{
> ....
> Key locationKey; //This will point for which location this ad has been
> created
> Key categoryKey;//This will point for which category this ad has been
> created.
> List<Key> featuresKey;//It will tell what fatures this property have e.g.
> Fully Furnished,With Parking etc, as i dont know what kind of feature it can
> have in future so i am creating all the features in seprate table/class and
> refernecing from here. Say i could have max 50 features.
>
> }
>
> Now i can query like this
> 1) Select PropertyAd where locationKey=SomeKey
> 2) Select PropertyAd where locationKey=SomeKey and categoryKey=SomeOtherkey
> 3) Select PropertyAd where locationKey=SomeKey  and categoryKey=SomeOtherkey
> and featureKey = someFeatureKey1 and featureKey = someFeatureKey2
>
> Now for query 1 i don't need to create explicit index
>
> for query 2 , 1 index will be created
> e.g. if LocationKey is Location(2) and CategoryKey is Category(3)
> then 1 index entry will be created Location(2) +Category(3) (or may be
> Category(3) + Location(2) too but not sure)
>
>
> for query 3 i am not sure how index will be created
> if for one propertyAd i have LocationKey is Location(2) and CategoryKey is
> Category(3) featureKey  Feature(10) and featureKey(12)
> then will it indexes as all combination of all four keys which will be
> 4*3*2*1=24 indexes(is it true?)
>
>
>
> Now i am thinking keys take care of most of the things then why not i put my
> all unowned foreign reference in one List as
>
> Class PropertyAd{
> ....
> List<Key> allKey;//It will have Location key, CategoryKey, feature key or
> any other key in future as per new requirment
>
> }
>
> and my queries will be like this
> 1) Select PropertyAd where allKey=SomeKey
> 2) Select PropertyAd where allKey=SomeKey and allKey=SomeOtherkey
> 3) Select PropertyAd where allKey=SomeKey  andallKey =SomeOtherkey and
> allKey= someFeatureKey1 and allKey= someFeatureKey2
>
> So if for one property ad i have four keys in this list will it create
> 4*3*2*1 indexes or it will just create 4 indexes.
>
> I am not sure how the indexes will be created and how much for it looks like
> second solution will be much better.
>
> All comments/suggestions are welcome
>
> Thanks in advance
> Ravi.
>
> --
> 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.

Reply via email to