1 Reply Latest reply on Mar 21, 2011 5:15 AM by Ilya Shaikovsky

    Redundant SQL queries

    Paweł Walaszek Newbie




      Why does Richfaces generate redundant SQL queries? May be is it needed? If it's true, why?


      For example (conception):



      <a4j:commandButton value="New User" action="#{userController.reinitUser}" onclick="#{rich:component('addUserPane')}.show();" />




      <rich:dataTable value value="#{userBean.users}" row="10">...</rich:dataTable>



      When I click the "New User" button, it generates a SQL query that selects items for dataTable.


      Another case, when I paginate through items in dataTable then it generates the same two queries for each page.


      Very strangle. It can have impact on efficiency at large data.


      English isn't my first language, sorry.