On 7/13/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:

[...]
> Due to Oracle inclusion, this has to be
>
>         select count(*) from [table] where [...]
>
> and then check that the result is > 0, at least in the Oracle backend
> (no "limit" extension in Oracle). The problem being that count(*) is not
> an optimised operation in PostgreSQL, however, we haven't yet split up
> those cases in a lot of the code (the recent Oracle merge moved a bunch
> of similar things to the count(*) case and I keep meaning to look at
> whether we can move them all to count(id_col), which is faster).

Just curious: In which backends is count(id_col) faster than count(*)?.

I'd say that any decent database engine should take both as the same
(as long as a PK exists and no outer joins are performed), but I could
be wrong and would be happy to know why.

-- 
Leo Soto M.

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

Reply via email to