valentina, error with DISCTINCT

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Apr 7 08:16:26 CDT 2009


Hello Ruslan,

Tuesday, April 7, 2009, 3:35:51 PM, you wrote:

> On 4/7/09 2:55 PM, "Christian - ChrisKatDev.com" <christian at chriskatdev.com>
> wrote:

>>> First of call can you download latest Vstudio
>>>    http://www.valentina-db.com/download/beta/
>> 
>> no, verion 4 have a big problem when you dump database (xml or sql) :
>> you dont have "return" in file
>> this xml (or sql) are impossible to read !!
>> I continue with 3.6

> This present in Mantis?
> Christian, note I have told about latest 4.1 betas.

> Ivan you have hear about such bug?

No - it's the first time, but it is fixed already for XML dumps.
BTW, SQL-dumps looks readable.


>>> And check this query against your db?
>> 
>> after several tests, it's appear that after make field indexed and
>> reindex all database ad field, it's ok now...
>> ???
>> distinct dont work with no indexed field ?

> No of course. Because it needs collect unique keys.

> But even if field was not indexed, engine self should care.
> Ivan please check this point.

It works as expected.

CREATE TABLE t1 ( f1 VarChar(128));
INSERT INTO t1 VALUES( '1' );
INSERT INTO t1 VALUES( '1' );
INSERT INTO t1 VALUES( '2' );
INSERT INTO t1 VALUES( '3' );
INSERT INTO t1 VALUES( '2' );

SELECT DISTINCT f1 FROM t1
--
1
2
3

And now yes - f1 is indexed due to the distinct algorithm.


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list