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 Au
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
> ___
Thanks for the responses to everyone! Here is the result for the explains.
view query=
explain select * from admin_exam_view where dateexam = '2012-08-13';
++-+---+--+-++-+++
On Thu, Aug 23, 2012 at 11:30:17AM -0700, James W. McNeely wrote:
> 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.AddrS
That is an example of where VIEWs screw up optimizations.
Rumor has it that 5.6.6 might have improvements.
Probably inefficient:
ON CONCAT(e.IdAppt , '0') = c.IdApptType
p might benefit from
INDEX(AddrState, DateOfBirth)
SHOW CREATE TABLE (for each table)
EXPLAIN SELECT (with and without VIE
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,
p.NameFirst,
p.Addr1,
p.Addr2,
p.AddrCity,
p.AddrState,
p.AddrZip,
p.Gender,
p.DateOfBirth,
-- Provi
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
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentia