On 02/05/13 01:39 -0700, Marc Rechté wrote:
> 
> 
> > Please give the full explaination and the queries you are analyzing 
> > otherwise it is useless. 
> >
> > SELECT "account_move".id AS id,"account_move"."create_uid" AS 
> "create_uid","account_move"."create_date" AS 
> "create_date","account_move"."centralised_line" AS 
> "centralised_line","account_move"."post_number" AS 
> "post_number","account_move"."write_uid" AS 
> "write_uid","account_move"."journal" AS "journal","account_move"."batch" AS 
> "batch","account_move"."state" AS "state","account_move"."period" AS 
> "period","account_move"."write_date" AS "write_date","account_move"."date" 
> AS "date","account_move"."number" AS "number","account_move"."description" 
> AS "description",CAST(EXTRACT(EPOCH FROM 
> (COALESCE("account_move".write_date, "account_move".create_date))) AS 
> VARCHAR) AS _timestamp FROM "account_move" WHERE (("account_move"."date" >= 
> '2012-01-01'::date) AND ("account_move"."date" <= '2013-04-09'::date) AND 
> ("account_move"."period" IN (SELECT "account_period".id AS id FROM 
> "account_period" WHERE (("account_period"."fiscalyear" IN (SELECT 
> "account_fiscalyear".id AS id FROM "account_fiscalyear" WHERE 
> (("account_fiscalyear"."company" = 1)) AND ("account_fiscalyear".id IN 
> (SELECT "account_fiscalyear".id AS id FROM "account_fiscalyear" WHERE 
> (((("account_fiscalyear"."company" = 1))) AND true)))))) AND 
> ("account_period".id IN (SELECT "account_period".id AS id FROM 
> "account_period" WHERE (((("account_period"."fiscalyear" IN (SELECT 
> "account_fiscalyear".id AS id FROM "account_fiscalyear" WHERE 
> (("account_fiscalyear"."company" = 1)))))) AND true)))))) ORDER BY 
> "account_move"."date" ASC,"account_move"."id" ASC
> 
> versus
> 
> SELECT "account_move".id AS id,"account_move"."create_uid" AS 
> "create_uid","account_move"."create_date" AS 
> "create_date","account_move"."centralised_line" AS 
> "centralised_line","account_move"."post_number" AS 
> "post_number","account_move"."write_uid" AS 
> "write_uid","account_move"."journal" AS "journal","account_move"."batch" AS 
> "batch","account_move"."state" AS "state","account_move"."period" AS 
> "period","account_move"."write_date" AS "write_date","account_move"."date" 
> AS "date","account_move"."number" AS "number","account_move"."description" 
> AS "description",CAST(EXTRACT(EPOCH FROM 
> (COALESCE("account_move".write_date, "account_move".create_date))) AS 
> VARCHAR) AS _timestamp FROM "account_move" WHERE ("account_move"."date" >= 
> '2012-01-01'::date) AND ("account_move"."date" <= '2013-04-09'::date)  AND 
> "account_move"."company" = 1 ORDER BY "account_move"."date" 
> ASC,"account_move"."id" ASC
>  

Thanks but without the explain, it is not useful.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgp6FTuuNwik5.pgp
Description: PGP signature

Reply via email to