I have a stored procedure on SQLserver that is executed by Matlab.  The procedure returns some 1.5million rows.  My OS is XP x32 and Matlab version is 2011a 32-bit.  Whenever I try to fetch this data, I get a Java Heap Memory Size error.  I tried using rowLimit as 200000 but I still got the same error.  Interestingly, SQL data is easily transferred when the stored procedure returns <700000 rows.  (if you want to know, there are 15 cols).
clear all                                      % free all available memory
conn = database('xxx' , 'userid', 'passwrd') ; % works fine
setdbprefs('DataReturnFormat','numeric');      % works fine
curs = exec(conn,'execute xxxxxx') ;           % works fine
fetch(curs) OR fetch(curs,200000) ;     --> java.lang.OutOfMemoryError: Java heap space
Can you suggest a way to import such data sets? Thanks!