Changed the calculations of sum totals to be raw SQL queries for speed boost. Not ideal but the best we are going to get.

Changed outstanding invoice to a raw SQL query for a speed boost. Average load now ~3.5s with ~10 invoices
This commit is contained in:
Tom Price
2015-03-03 02:20:07 +00:00
parent ff1d5730a2
commit 472cc3f1bb
4 changed files with 65 additions and 18 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('RIGS', '0018_auto_20150130_0016'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='method',
field=models.CharField(blank=True, max_length=2, null=True, choices=[(b'C', b'Cash'), (b'I', b'Internal'), (b'E', b'External'), (b'SU', b'SU Core')]),
preserve_default=True,
),
]

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('RIGS', '0019_auto_20150131_1919'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='method',
field=models.CharField(blank=True, max_length=2, null=True, choices=[(b'C', b'Cash'), (b'I', b'Internal'), (b'E', b'External'), (b'SU', b'SU Core'), (b'T', b'TEC Adjustment')]),
preserve_default=True,
),
]