1 2 Previous Next 18 Replies Latest reply on May 29, 2012 9:21 PM by shawkins Go to original post
      • 15. Re: Internal Materialized Views

        Hi Steven,

         

          Thanks for your response.

         

          > Is there a way to configure these Internalized MViews so that they get loaded into Memory when the JBoss Server starts ??

         

          What happens if i execute a "select * from mat_view_table" during the initialization phase. Does it makes the entire contents of the table be cached in memory ?

         

        > It looks like it still is cahcing 1024 Rows from the above logs!! Is it the default settings ??

         

            I executed the following code

         

           [CODE]

                    StringBuilder strQuery = new StringBuilder("SELECT * FROM "+tableName);

                    Statement st = conn.createStatement();

                    ResultSet rs = st.executeQuery(strQuery.toString());

                    int counter =0;/*

                    while(rs.next()){

                        counter++;

                    }

                    System.out.println(" Total No.of Rows=["+counter+"]");

           [/CODE]

         

            And saw the following entries in the log. It pirnted out the current row count 512 and 1024 before closing out the processor. Not sure what it means or why it selected only 512 & 1024.

         

            11:36:37,432 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) JOGvPYsbxx2Q.0.0.0 Obtained results from connector, current row count: 512

         

            11:36:37,765 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue3) JOGvPYsbxx2Q.0.0.0 Obtained results from connector, current row count: 1024

         

            11:36:37,799 DEBUG [org.teiid.TXN_LOG] (New I/O server worker #2-1) after cancelTransactions : null

         

            11:36:37,803 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue4) Request Thread JOGvPYsbxx2Q.0 with state PROCESSING

         

            11:36:37,817 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue4) QueryProcessor: closing processor

         

            I might be reading too much into the logs.

         

        Thanks
        Sateesh

        • 16. Re: Internal Materialized Views
          rareddy

          Sateesh,

           

          If you run the command once the server starts, Yes it will cache all the contents of the view table's data into cache. (Note that Cache does not always mean memory in Teiid, it could be part memory and disk depending upon the resource availability and configuration).

           

          The log you are looking at correspond to the query you executed, but it does *not* correspond to how many rows it cached. In Teiid all the data is processed in  batches of 1024/512 tuples, which are defined for effective processing from source and inside the engine processing. You are seeing one occurrence of those data fetching. Usally when Teiid loads the materialized table it writes log message to the console window as to how many rows it has fetched.

           

          One way you can check how many rows are being returned from source is with running OPTION NOCACHE like for ex:

           

          select count(*) from mat_view_table OPTION NOCACHE

           

          Ramesh..

          • 17. Re: Internal Materialized Views

            Hi Ramesh,

             

              Thanks for fixing the NPE Jira Ticket you have opened.

             

              https://issues.jboss.org/browse/TEIID-2049

             

              How can i get this fix ?? I cannot find a nighly build or 8.1 version in the download page.

             

            Thanks
            Sateesh

            • 18. Re: Internal Materialized Views
              shawkins

              8.1 Alpha1 will be posted this week or you can build trunk using svn/maven:

               

              svn co https://anonsvn.jboss.org/repos/teiid/trunk

              cd trunk

              mvn -P release install

               

              the release artifacts will then be in trunk/build/target

              1 2 Previous Next