EASOL / easol

EASOL - A New Way to Open Learning with Ed-Tech
http://easol.org
GNU Affero General Public License v3.0
1 stars 4 forks source link

Problem with Flex Report #349

Closed edgarf closed 8 years ago

edgarf commented 8 years ago

@regiscamimura , please take a look at the screenshot. Could you please tell us how can we avoid this error? When we try applying the same query directly on database it works and gets us about ~8000 rows. numeric-grade-blank.

I will get the export flex report little bit later.

edgarf commented 8 years ago

Here's the query about it

Error Number: IMSSP/-59

Memory limit of 10240 KB exceeded for buffered query

SELECT StudentAttributes.StudentUSI as "Student_ID", StudentAttributes.FirstName as "First Name", StudentAttributes.LastSurname as "Last Name", StudentGradeEarned.ClassPeriodName , StudentGradeEarned.ClassroomIdentificationCode , StudentGradeEarned.LocalCourseCode , StudentGradeEarned.SchoolYear , StudentGradeEarned.BeginDate , StudentGradeEarned.TermType , StudentGradeEarned.NumericGradeEarned , StudentGradeEarned.GradeType , StaffSectionAttributes.StaffUSI , StaffSectionAttributes.LastSurname AS StaffLastSurname , StaffSectionAttributes.FirstName AS StaffFirstName FROM EASOL.StudentGradeEarned LEFT JOIN EASOL.StaffSectionAttributes ON StudentGradeEarned.SchoolId = StaffSectionAttributes.SchoolId AND StudentGradeEarned.LocalCourseCode = StaffSectionAttributes.LocalCourseCode AND StudentGradeEarned.ClassPeriodName = StaffSectionAttributes.ClassPeriodName AND StudentGradeEarned.ClassroomIdentificationCode = StaffSectionAttributes.ClassroomIdentificationCode AND StudentGradeEarned.SchoolYear = StaffSectionAttributes.SchoolYear AND StudentGradeEarned.TermType = StaffSectionAttributes.StaffSectionAssociationTermType INNER JOIN EASOL.StudentAttributes ON StudentGradeEarned.StudentUSI = StudentAttributes.StudentUSI AND StudentGradeEarned.SchoolYear = StudentAttributes.SchoolYear WHERE 1=1 AND StudentAttributes.SchoolId = '2' AND StudentGradeEarned.SchoolYear LIKE '%2014%'

Filename: D:/home/site/wwwroot/application/views/Reports/display-bar-chart.php

Line Number: 12
edgarf commented 8 years ago

@regiscamimura A solution was found - http://stackoverflow.com/questions/27390793/sql-server-2008-returns-memory-limit-of-10240-kb-exceeded-for-buffered-query changing the php.ini variable helps. The query though takes 20+ seconds.

regiscamimura commented 8 years ago

@edgarf We can move forward with that cached queries feature to improve performance. Should I get you a plan for that with estimates and such, or just investigate for any possible ways to improve the query and/or its execution in PHP layer?

edgarf commented 8 years ago

For now - we are ok with the speed, once we face the bottle neck, we can investigate it.