Hi Aaron,

Your may roll down Keywords model
to KeywordsOwnerTopic:

class KeywordsOwnerTopic(db.Model):
    owner_saved = db.ReferenceProperty()  #though I prefer to use
StringProperty and store key_name, and query by it
    topic = db.ReferenceProperty()
    sort1property = db.IntegerProperty

Does original "Keywords" store some more data?

Then you may avoid duplication by referencing to it:

class KeywordsOwnerTopic(db.Model):
    owner_saved = db.ReferenceProperty()  #though I prefer to use
StringProperty and store key_name, and query by it
    topic = db.ReferenceProperty()
    sort1property = db.IntegerProperty()
    keywords_ref = db.ReferenceProperty() #Keywords model key

class Keywords(db.Model):
    some_other_data = db.SomeProperty()
    ...


Also if you querying some model only by properties, not the keys/
key_names,
you have an option to store short data (500 bytes) in key_name (+
adding some unique number as prefix)
and querying with keys_only=True - this will be much faster
This may be used E.g. if Keywords particular entity represent only one
keyword, and its length < 500
(may be I misunderstood your data model though)

Best regards,
Den




On Mar 11, 11:23 pm, Aaron <[email protected]> wrote:
> Hi Jay,
>
> Exactly, I need to query for keywords based on user and topic.
>
> That's an interesting suggestion, but the list of saved keywords can
> get longer than 5000.  I also need to be able to sort by a number of
> different integer properties that I didn't explicitly include in the
> model.
>
> On Mar 11, 9:40 am, Jay <[email protected]> wrote:
>
>
>
>
>
>
>
> > So you have the user and the topic, and want the key words? Do I have that
> > right?
>
> > What about moving the saved keywords to the user? You might do something
> > like cat them together in a list on user. How big do you expect the list to
> > get per user?

-- 
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