Specifically, a query with multiple equality filters on a single list property requires an (exploding) custom index with the property repeated in multiple columns if and only if the query also uses inequality filters or sort orders on other properties. If a query uses nothing but equality filters and no sort orders, it can be performed using the "merge join" algorithm using only the built-in single property indexes.
It's a lot to ask for a tag search to not use a custom sort order, so I won't say it's a complete solution. If it helps, the effective sort order of an equality-filter-only query is key order, ascending. -- Dan On Sun, Apr 5, 2009 at 1:04 PM, Barry Hunter <[email protected]>wrote: > > That thread is refering to 'in' which effectivly is a OR - which as > pointed out by ryan expands to three(or multiple) queries under the > hood. > > But 秦锋 I think is referring to AND, the code in the quoted post is > only pseudo code (and/or gql expands to 'and' internally - sorry, I > dont know enough python) > > a query of "WHERE tag = 'tag1' AND tag = 'tag2' AND tag = 'tag3' " - > will require *three* indexes on `tag` > > - this only make sense for ListProperties. But is a valid query. For > Lists, " tag = 'tag1' " could be written like " ('tag1' IN LIST `tag`) > " - which is different to the sql/gql IN keyword. > > > > On 05/04/2009, Andy Freeman <[email protected]> wrote: > > > > Something is wrong here - it should not generate multiple indices per > > tag, regardless of the length of the list. (The query won't work if > > the length is greater than 30, but that's a different problem.) > > > > see Ryan's message in > > > > > http://groups.google.com/group/google-appengine/browse_thread/thread/1285c272c0e1b62a > > > > That time, the problem turned out to be some user error, but I didn't > > see an explanation. > > > > > > > > > > On Apr 3, 8:58 am, 秦锋 <[email protected]> wrote: > > > Alkis: > > > I re-check my code and found if I use list property in gql like > > > following: > > > > > > WHERE tags = :1, inputTags (it's a list) > > > > > > If there are 3 tag in inputTags, index will be: > > > > > > name:tag > > > name:tag > > > name:tag > > > > > > Does this cost huge space? > > > > > > But it's really cool for multi-tags searching in app! > > > > > > On 4月3日, 下午8时50分, Alkis Evlogimenos ('Αλκης Ευλογημένος) > > > > > > > > > > > > <[email protected]> wrote: > > > > What do your models look like? > > > > > > > On Fri, Apr 3, 2009 at 2:00 PM, 秦锋 <[email protected]> wrote: > > > > > > > > My App: cndata4u.appspot.com > > > > > Now I have imported about 2500 records there, and with only THREE > > > > > entities. But I have found that these data have occurred 20% data > > > > > store, about 200M! > > > > > My original CSV files have only 308K! > > > > > > > > Any idea? > > > > > > > -- > > > > > > > > > Alkis- Hide quoted text - > > > > > > - Show quoted text - > > > > > > > > > > -- > Barry > > - www.nearby.org.uk - www.geograph.org.uk - > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
