Hello  Thomas,

I might just try that. With postgres, the database engine being
usually on a dedicated server doing only that (that is to serve data),
we never had a problem with response time.

I like your option. I will certainly try that. Thanks.

Patrice

On 6 juin, 05:37, Thomas Mueller <[email protected]> wrote:
> Hi,
>
> The view needs to read the whole table, and it's quite a big table.
> Did you run ANALYZE?
>
> truncate table dpacte;
> @LOOP 175000 insert into dpacte(pkidc, noattest, nce, sexe, noprof,
> noprofr, etabl) values(?, ?, mod(?, 1000), mod(?, 2), ?, ?, '');
> analyze;
> select max(total) from lotsactnew;
>
> H2: the first run (without cache): 10s, second time (with cache) 2s
> PostgreSQL: with cache 2.1 s (I didn't try PostgreSQL without cache).
>
> I don't think there are simple ways to improve the performance (even
> when using another database). One solution would be to maintain the
> view as a separate table, and update it using triggers. That's
> basically the same thing as a materialized view. For each insert in
> dpacte, you increase the value in the columns HON_TOTAL and MONTPAYE,
> for each delete you decrease it.
>
> Regards,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to