On 14 Jul 2011 03:11, "Andre Terra" <andrete...@gmail.com> wrote:
>
> PostgreSQL or bust.

Hehe, a lot of people have suggested using PostgreSQL, and in all fairness I
do now understand some of the arguments in the MySQL vs debate.. Until i
find something really really wrong with mysql, ill probably 'stay with the
devil i know' lol.

>
> </flame>
>
> On Wed, Jul 13, 2011 at 9:24 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:
>>
>>
>> On 14 Jul 2011 00:13, "bruno desthuilliers" <
bruno.desthuilli...@gmail.com> wrote:
>> >
>> > On 13 juil, 21:37, "Cal Leeming [Simplicity Media Ltd]"
>> > <cal.leem...@simplicitymedialtd.co.uk> wrote:
>> >
>> > >         _users = map(lambda x: x.get('memberid'),
Members.objects.filter(
>> > >             username = self.username
>> > >         ).values('memberid'))
>> >
>> > What's wrong with values_list ?
>> >
>> > member_ids = Members.objects.filter(
>> >                         username = self.username
>> >                         ).values_list('memberid', flat=True)
>>
>> I didn't know about values_list(), thanks for this :)
>>
>> >
>> >
>> > And FWIW, did you try the obvious:
>> >
>> > return Session.objects.filter(
>> >            member__username=self.username,
>> >            is_fake = 0
>> >         ).order_by("-id")
>>
>> If you look at the original query i pasted, you'll see that this
modification wouldn't have been any better (as they both would have
generated the same query). The problem is that mysql does strange ass things
when it comes to nested lookups or w/e its called. But tbh, ive come across
so many times when its faster to perform operations outside of mysql, than
it is inside.. the more i use mysql, the more i see how flawed it is :X
>>
>> >
>> > (not that it might necessarily be faster - depending on your dataset,
>> > indexes, hardware and whatnot).
>> >
>> > --
>> > You received this message because you are subscribed to the Google
Groups "Django users" group.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
"Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to