Note the huge estimated number of rows. That should decline significantly.
What's the value of key_buffer_size? It should generally be 20% of
_available_ RAM (for MyISAM usage).
-Original Message-
From: James W. McNeely [mailto:jmcne...@nwrads.com]
Sent: Wednesday, November 14, 2012
I have a query I'm having trouble with. If do this query which is DATE plus
ProcModecode, it is very fast:
SELECT e.zzk FROM exams e
-- JOIN Appt_ a ON e.IdAppt = a.IdAppt
-- JOIN Affil_ af ON a.IdAffil_primary = af.IdAffil
WHERE e.dateexam = '2012-09-01' AND e.dateexam = '2012-09-30'
AND
) -- in that order
(I can't predict which index it would use.)
Are IdAppt the same datatype and collation in each table?
-Original Message-
From: James W. McNeely [mailto:jmcne...@nwrads.com]
Sent: Wednesday, November 14, 2012 2:34 PM
To: mysql@lists.mysql.com
Subject: query tuning
I have
I am working on a view based on this query:
===
SELECT
-- Patient Info
p.IdPatient,
p.IdLastword MRN,
p.NameLast,
p.NameFirst,
p.Addr1,
p.Addr2,
p.AddrCity,
p.AddrState,
p.AddrZip,
p.Gender,
p.DateOfBirth,
-- Provider Info
af.IdAffil,
af.PractName,
difference between the two.
Jim McNeely
On Aug 23, 2012, at 12:39 PM, Shawn Green wrote:
On 8/23/2012 2:30 PM, James W. McNeely wrote:
I am working on a view based on this query:
===
SELECT
-- Patient Info
p.IdPatient,
p.IdLastword MRN,
p.NameLast
This didn't help, but good try!
Jim McNeely
On Aug 23, 2012, at 12:27 PM, Martin Gainty wrote:
If memory serves predicates convert strings to column-data-type (in your case
DATE) this *should* help
WHERE dateexam = STR_TO_DATE('2012-08-13','%Y-%m-%d')
does this help?
Martin
I think I'll just make a nightly process run that drops and then recreates the
table, unless someone has a workable idea of how to make this view query-able.
Thanks!
Jim McNeely
On Aug 23, 2012, at 2:06 PM, James W. McNeely wrote:
This didn't help, but good try!
Jim McNeely
On Aug 23
My backups from a mysqldump process are useless, because the dump files are not
escaping single quotes in the data in the fields.
So, O'Brien kills it - instead of spitting out
'O\'Brien'
it spits out
'O'Brien'
I don't see anywhere in the documentation about mysqldump where you can tweak