Re: Subquery Select with aggregate function running very slow

Gnani Swami <[email protected]>
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <CAMjykYbBfZXn4HZLaGi1cZap0XZ-EFWEcHTb9ok+a0Q4UH2okA@mail.gmail.com>
Have you created index on id-account?
On 28 Oct 2013 03:15, "avaz" <[email protected]> wrote:

> Hi,
>
> I have file db started by follow command:
> java -Xms512m -Xmx512m -cp hsqldb-2.3.1.jar org.hsqldb.server.Server
> --database.0 file:./test --dbname.0 test
> This database contains about 197 tables.
> Bellow is the structure of table related with this issue:
>
> create table test (
>   id NUMERIC (8)  identity,
>   id_account numeric (8) not null ,
>   value NUMERIC (8) not null,
>   BASE_DATE          DATE             not null
> );
>
> This table is populated with 174789 lines.
>
> And the follow script take hours to return (this be honest, I don't know
> how
> many hours it take, because after left for a long time running I cancelled
> the execution):
>
> SELECT  t1.id,
>   (SELECT sum(t2.value) FROM test t2 WHERE t2.id_account = t1.id_account)
> FROM test t1;
>
> In oracle, with the same scenario, the script returns instantaneously.
>
> This is the normal behaviour of hsqldb?
>
> Thanks!
>
>
>
>
>
> --
> View this message in context:
> http://hsqldb.10974.n7.nabble.com/Subquery-Select-with-aggregate-function-running-very-slow-tp3976.html
> Sent from the HSQLDB - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Hsqldb-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hsqldb-user
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk

_______________________________________________
Hsqldb-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.