Open dcunning11235 opened 9 years ago
Is the idea to change COUNT(*)
to COUNT(PLATE)
? Have you tested whether this is any faster?
Yes, something like COUNT(PLATE); and no, need to test this.
I noticed because I had a query running for some time (with lots else going on, so generally slowing the machine down) and when I killed it, this is the statement it was executing. Count(*) should trigger a full table scan; Googling a bit on this confirms that. What I've read sounds... confused as to whether e.g. COUNT(PLATE) is better. But that should (so I claim/hope) only hit the index. Need to set up some tests to confirm.
Should speed things up if only accessing the index columns; confirm and change if needed.