Re: [SQL] help-simplify query

2009-11-09 Thread rafizeldi
dateadd() is not sql postgresql standard, it's mssql in postgresql i only need to use +/- operators and interval for the same function dateadd('year', 1, '2008/1/1') ==> date '2008/1/1' + interval '1 year' rafizeldi wrote: > > Dear All > I need to simplify this query, It takes a lot of time t

[SQL] help-simplify query

2009-10-17 Thread Muhammad Rafizeldi
Dear All I need to simplify this query, It takes a lot of time to execute Since "skala_rental" table has 2.3million rows(Table Size:387 MB, Indexes Size: 132MB) and scanned 6 times in the execution. cf_application_id has +10rows, Table Size: 21 MB, Indexes Size: 18MB I guest the problem is on t