Bugs item #2585592, was opened at 2009-02-10 17:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2585592&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: SQL/Core Group: SQL "stable" Status: Open Resolution: None Priority: 5 Private: No Submitted By: Romulo Goncalves (romulog) Assigned to: Niels Nes (nielsnes) Summary: Serial with order by is not working properly Initial Comment: Look to the following example: create table t1 (num int, age int); create table t2 (id serial, num int, age int); insert into t1 values(1,3); insert into t1 values(1,4); insert into t1 values(3,3); insert into t1 values(6,3); insert into t1 values(2,3); insert into t1 values(2,2); insert into t1 values(5,1); insert into t1 values(1,1); insert into t2(num, age) select num, age from t1 order by num, age; select * from t2; drop table t1; drop table t2; The selection result is: % sys.t2, sys.t2, sys.t2 # table_name % id, num, age # name % int, int, int # type % 1, 1, 1 # length [ 8, 1, 1 ] [ 1, 1, 3 ] [ 2, 1, 4 ] [ 6, 2, 2 ] [ 5, 2, 3 ] [ 3, 3, 3 ] [ 7, 5, 1 ] [ 4, 6, 3 ] I think it is not right and the right one is: The selection result is: % sys.t2, sys.t2, sys.t2 # table_name % id, num, age # name % int, int, int # type % 1, 1, 1 # length [ 1, 1, 1 ] [ 2, 1, 3 ] [ 3, 1, 4 ] [ 4, 2, 2 ] [ 5, 2, 3 ] [ 6, 3, 3 ] [ 7, 5, 1 ] [ 8, 6, 3 ] I think the query should create a clustered temp table on num, age (from the select clause) and then do the insertion into t2 using the serial. The sort is applied over the temp table, but it should not be done over the final table t2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2585592&group_id=56967 ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
