Share

Who Voted?

Tracker: Bugs

7 voter_search queries are rather inefficient - ID: 2796371
Last Update: Tracker Item Submitted ( doubleplusjeff )

Example 1: querying once to get the number of results, then a second time
to get the actual results.

Example 2: When searching by name and a full state, compare the following
queries:

// Runs in 30 seconds
SELECT COUNT(*) FROM Voters
WHERE ( lname = 'Gates' ) AND (Voters.CountyID between '02959' and
'02991')

// Runs in 5 seconds
SELECT COUNT(*) FROM Voters USE INDEX (idx_CountyAndName)
WHERE ( lname = 'Gates' ) AND (Voters.CountyID between '02959' and
'02991')


Jeffrey Gerard ( doubleplusjeff ) - 2009-05-25 10:56

7

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.