simonbun wrote:
> If your situation allows it, you could de-normalize and save the count
> result in a separate table. Then you need to adjust the count whenever
> you add / delete a row ofcourse.
We keep a set of 'stats' tables which count various things in the
database (nr of comments, number
Nis Jørgensen skrev:
>
> What is missing above is creating INSERT/UPDATE/DELETE rules for the
> "entity" view. I hacked together the ones below - they seem to work,
> but there might be subtle points of how this works that I have not
> understood.
>
[...]
> CREATE RULE entity_insert as ON INS
Nis Jorgensen skrev:
> Paul Rauch wrote:
>
>> Is there a way to reduce execution time by counting objects?
>>
>> it's even splitted in two queries now, with only 2474487 entries ;)
>>
>> in django I use "model.objects.count()"
>>
>> SELECT COUNT(*) FROM "rainbowtables_hashes":34.552
>>
>> SELEC
If your situation allows it, you could de-normalize and save the count
result in a separate table. Then you need to adjust the count whenever
you add / delete a row ofcourse.
If you're a database purist I might have made your stomach turn,
however :)
regards,
Simon
On Jun 7, 8:19 pm, Paul Rauch
Paul Rauch wrote:
> Is there a way to reduce execution time by counting objects?
>
> it's even splitted in two queries now, with only 2474487 entries ;)
>
> in django I use "model.objects.count()"
>
> SELECT COUNT(*) FROM "rainbowtables_hashes":34.552
>
> SELECT COUNT(*) FROM "rainbowtables_hashes
Is there a way to reduce execution time by counting objects?
it's even splitted in two queries now, with only 2474487 entries ;)
in django I use "model.objects.count()"
SELECT COUNT(*) FROM "rainbowtables_hashes":34.552
SELECT COUNT(*) FROM "rainbowtables_hashes":31.024
greetz Paul Rauch
--~
6 matches
Mail list logo