Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Yes, but then you just do a test on the entity you got from the query (one test on one entity, fast) so add a last step.. using previous logic you end up with x2=71 y2=75 final step will beis (z of 76) (y2 of 75) if no... no results.. if yes... have 1 result that should solve that part On Tue, May 4, 2010 at 02:04, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, Really appreciate the logic you suggested. But consider this case: There are only two intervals in db: x1 = 4 y1 = 70 and x2 = 71 y2 = 75. I want to search by 76. The 76 doesn't fall in any category but still the query will return the second interval, which is not correct. Instead the query should say that there is no matching interval. Am I correct? Regards Romesh On Tue, May 4, 2010 at 11:09 AM, Tristan Slominski tristan.slomin...@gmail.com wrote: in that case the solution to your dilemma is as follows query.addFilter(x, FilterOptions.LESS_THAN, z); query.addSort(x, SortOrder.DESC); then execute the query with a limit of 1 that is the answer you seek in other words... assume you have two intervalsx1 = 4 y1 = 70 and x2 = 71 y2 = 75. you want to find interval that matches your condition ofx 74 y add filter for x less than 74 will give you two results where x1=4 in first result and x2=71 in second result now sort these results descending so that x2 is the first result x2=71 x1=4 set limit of 1 gives your query a result of x2 you don't need property y does that work for you? On Mon, May 3, 2010 at 22:45, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hey Tristan, Seems you have got it solved. Thanks. I think it should work for me without any issues. I will let you know once I implement it. You have a good logic man. Can I add you on Gmail? Thanks and Regards Romesh On Tue, May 4, 2010 at 7:08 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Yes, but then you just do a test on the entity you got from the query (one test on one entity, fast) so add a last step.. using previous logic you end up with x2=71 y2=75 final step will beis (z of 76) (y2 of 75) if no... no results.. if yes... have 1 result that should solve that part On Tue, May 4, 2010 at 02:04, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, Really appreciate the logic you suggested. But consider this case: There are only two intervals in db: x1 = 4 y1 = 70 and x2 = 71 y2 = 75. I want to search by 76. The 76 doesn't fall in any category but still the query will return the second interval, which is not correct. Instead the query should say that there is no matching interval. Am I correct? Regards Romesh On Tue, May 4, 2010 at 11:09 AM, Tristan Slominski tristan.slomin...@gmail.com wrote: in that case the solution to your dilemma is as follows query.addFilter(x, FilterOptions.LESS_THAN, z); query.addSort(x, SortOrder.DESC); then execute the query with a limit of 1 that is the answer you seek in other words... assume you have two intervalsx1 = 4 y1 = 70 and x2 = 71 y2 = 75. you want to find interval that matches your condition ofx 74 y add filter for x less than 74 will give you two results where x1=4 in first result and x2=71 in second result now sort these results descending so that x2 is the first result x2=71 x1=4 set limit of 1 gives your query a result of x2 you don't need property y does that work for you? On Mon, May 3, 2010 at 22:45, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Sure, good luck. On May 4, 2010 9:03 AM, romesh soni soni.rom...@gmail.com wrote: Hey Tristan, Seems you have got it solved. Thanks. I think it should work for me without any issues. I will let you know once I implement it. You have a good logic man. Can I add you on Gmail? Thanks and Regards Romesh On Tue, May 4, 2010 at 7:08 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Yes, bu... -- You received this message because you are subscribed to the Google Groups Google App Engine for... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Thomas, it is possible to pre-determine the solution list for given lower and upper bounds x and y. But there can be enormous rows for a given (x,y) pair. And there will be enormous rows containing (x,y) pairs. So I can not keep a predetermined list. Regards Romesh On Mon, May 3, 2010 at 5:52 AM, Thomas mylee...@gmail.com wrote: I can't imagine what your data is. Is it possible to pre-solve the solution list z for every (x, y) pair and store them like (x, y, list of z). If it is the case, you can use a simple z=somevalue filter to get your single result. Thomas On 5月2日, 下午4時57分, romesh soni soni.rom...@gmail.com wrote: Tristan, sorry for the mistake. I wrote the wrong thing ( I realized this at night when I went to bed for sleep) It is field1=1000=field2. A given value will always be between the lower and upper bound (field1 and field2). Thanks Romesh On Sun, May 2, 2010 at 11:20 AM, Tristan tristan.slomin...@gmail.com wrote: did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@googlegroups.com google-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%252bunsubscr...@googlegroups.com google-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
[appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi romesh: Datastore allows multi-value property. So you can have each (x,y, list of possible z) in only one row and the filter is as simple as where z=some-value. The only limitation is that list-of-z can not exceed 5000 elements. Thomas On 5月3日, 下午2時02分, romesh soni soni.rom...@gmail.com wrote: Thomas, it is possible to pre-determine the solution list for given lower and upper bounds x and y. But there can be enormous rows for a given (x,y) pair. And there will be enormous rows containing (x,y) pairs. So I can not keep a predetermined list. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastore allows multi-value property. So you can have each (x,y, list of possible z) in only one row and the filter is as simple as where z=some-value. The only limitation is that list-of-z can not exceed 5000 elements. Thomas On 5月3日, 下午2時02分, romesh soni soni.rom...@gmail.com wrote: Thomas, it is possible to pre-determine the solution list for given lower and upper bounds x and y. But there can be enormous rows for a given (x,y) pair. And there will be enormous rows containing (x,y) pairs. So I can not keep a predetermined list. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
in that case the solution to your dilemma is as follows query.addFilter(x, FilterOptions.LESS_THAN, z); query.addSort(x, SortOrder.DESC); then execute the query with a limit of 1 that is the answer you seek in other words... assume you have two intervalsx1 = 4 y1 = 70 and x2 = 71 y2 = 75. you want to find interval that matches your condition ofx 74 y add filter for x less than 74 will give you two results where x1=4 in first result and x2=71 in second result now sort these results descending so that x2 is the first result x2=71 x1=4 set limit of 1 gives your query a result of x2 you don't need property y does that work for you? On Mon, May 3, 2010 at 22:45, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, You got a good catch. But the code which populates the data will never let this happen. If there is a pair x = 4 and y = 10, then there will be no such other pair which consist values between 4 and 10. there will be one and only one set for values 4,5,6,7,8,9,10 and that will be (4,10). I hope my explanation is helpful. So it is guaranteed of having one solution per query. On Mon, May 3, 2010 at 7:31 PM, Tristan Slominski tristan.slomin...@gmail.com wrote: Hey, so I've been thinking about the problem description... you mentioned that there will ever only be one solution for the query, but that doesn't seem like a valid constraint. For example, let x = 4 and y = 10, let x2 = 5 and y2 = 11. The value of z = 6 will result in two solutions. The reason I am asking, is that the contraint of only one solution existing suggest a different mapping of solutions than the one you suggested (not sure what that different approach would be yet, but it could be something along the lines of enumerating the intervals). Can you guarantee the constraint of only one solution per query? On May 3, 2010 3:01 AM, romesh soni soni.rom...@gmail.com wrote: Hi Thomas, the possible value of x and y can be 2020 and 203204206207. do you see that it is possible to make such thing in 5000 element limitation. Are you talking of ArrayList? Your solution is good for small list, but I am afraid that it will not suit my requirement.. On Mon, May 3, 2010 at 1:00 PM, Thomas mylee...@gmail.com wrote: Hi romesh: Datastor... -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Tristan, sorry for the mistake. I wrote the wrong thing ( I realized this at night when I went to bed for sleep) It is field1=1000=field2. A given value will always be between the lower and upper bound (field1 and field2). Thanks Romesh On Sun, May 2, 2010 at 11:20 AM, Tristan tristan.slomin...@gmail.comwrote: did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Inequality Filters Are Allowed On One Property Only
I can't imagine what your data is. Is it possible to pre-solve the solution list z for every (x, y) pair and store them like (x, y, list of z). If it is the case, you can use a simple z=somevalue filter to get your single result. Thomas On 5月2日, 下午4時57分, romesh soni soni.rom...@gmail.com wrote: Tristan, sorry for the mistake. I wrote the wrong thing ( I realized this at night when I went to bed for sleep) It is field1=1000=field2. A given value will always be between the lower and upper bound (field1 and field2). Thanks Romesh On Sun, May 2, 2010 at 11:20 AM, Tristan tristan.slomin...@gmail.comwrote: did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group,
[appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Inequality Filters Are Allowed On One Property Only
Try to combine x and y into a granular z, which can be checked against. E.g. if for a geographic query you'd combine lat long to get a hash with a reasonable granularity (whatever suits your application). Pre-calculate those and save them to the store. You lose out the fine-grained inequality tests, but you gain a lot of speed, which reduces your read costs hugely. Richard On May 1, 9:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Inequality Filters Are Allowed On One Property Only
OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Inequality Filters Are Allowed On One Property Only
did you make an error or are you describing this condition? 1000 = field1 = field2 = 1000 On May 1, 10:26 am, romesh soni soni.rom...@gmail.com wrote: OK, let me explain the query which I need to run (I am putting the sql server syntax for it, thats what I was working so far): select * from mytable where field1=1000 and field2=1000; Thats what I need to run on on datastore. Field1 and field 2 are have a relation. More specifically, Field1 =field 2. My db is such that when I search for any given integer say 1000, then the db will return only one row for given condition : field1=1000 and field2=1000; Regards, Romesh.. On Sat, May 1, 2010 at 4:42 PM, Tristan tristan.slomin...@gmail.com wrote: Hey, So, there's no more 1000 query limitation, that went away (unless it was put back in). I see what you're saying though. Need to know more about what the problem is. I assume x and z are the two properties? It seems that x and z are correlated (since you guarantee that there is only one solution that meets the criteria). This correlation can probably be exploited to better solve the problem, but I need some constraints to work with. What is the relationship between x and z that guarantees you will have only one solution? Tristan On May 1, 2:30 am, romesh soni soni.rom...@gmail.com wrote: Hi Tristan, The solution you provided is the best one among of those which I have found so far. But this is not what I was looking for, my database is quite large and its will grow continuously to millions of records in time. But there will be only 1 matching record for my filter (x=y and y=z) If I try your suggested approach, then I will have to scan all records in loop.(1000 limitation) On Fri, Apr 30, 2010 at 6:58 PM, Romesh soni.rom...@gmail.com wrote: I have been trying to find a workaround for this limitation and spent 2 days and read almost all blogs, discussion groups., but can not find a solution to it. Has any one able to find a way to handle this limitation? (The List property solution doesn't work.) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group athttp:// groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.