If you can post the create view statement & running the select manually, both with the execution plans, then it might provide some insight?

You also say if you drop and re-create the view then it is better?. Are you creating the view, then populating the tables, then running the view? You could try analyze http://h2database.com/html/grammar.html#analyze



On 23/04/2013 4:12 PM, Niko Paltzer wrote:
Hi Noel,

a smalltest case is hard to find.

Maybe the answer to the following question can lead to the solution:

How can the recreation of a view affect the execution plan of this view?

Best regards,
Niko


On Saturday, April 20, 2013 10:55:20 AM UTC+2, Noel Grandin wrote:

    No, but if you can create a small self contained test case, we can
    attempt to find a solution.

    On Saturday, 20 April 2013, Niko Paltzer wrote:

        Hi Noel,

        thank you for the hint. Do you happen to have any idea what it
        could be?

        Any test I could do?

        Cheers,
        Niko

        On Fri, Apr 19, 2013 at 6:12 PM, Noel Grandin wrote:
        > H2 does not cache execution plans for views.
        >
        > So something else must be at work.
        >
        >
        > On Friday, 19 April 2013, Niko Paltzer wrote:
        >>
        >> Hi,
        >>
        >> I have a view in my H2 with an execution plan that is very
        slow for the
        >> data present in the database. select * from view takes 150
        seconds.
        >>
        >> If the select-statement of the view es executed separately,
        the H2 chooses
        >> a better execution plan. select * takes less than a second.
        >>
        >> If I drop and recreate the view, the better plan is chosen
        for it, too.
        >>
        >> Is there a possibility to update the execution plan for the
        view without
        >> recreating the whole view?
        >>
        >> The version is 1.3.167.
        >>
        >> Best regards,
        >> Niko


--
You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to