Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Is it normal that yxdb gets smaller after sorted?

chloehong445
5 - Atom

Hi there! I had a large file and it contained a unique ID. I was trying to see whether this ID had been duplicated in the previous step so I added a unique tool and outputted the results. As you know, a unique tool automatically outputs data sorted. And I discovered that the sorted one is much smaller than the unsorted one (as below) even though they have the same records.

My question is should these two files be the same only except for the order difference?  Thanks!

Screen Shot 2024-01-28 at 9.31.47 PM.png

7 REPLIES 7
Qiu
21 - Polaris
21 - Polaris

@chloehong445 
I have never observed or thought this way.
The record number is same so maybe the data structure is optimized after sorting?

chloehong445
5 - Atom

I think so, just want to make sure 🤣

Qiu
21 - Polaris
21 - Polaris

@chloehong445 
I think you are correct.

I opened the sample flow of Sorting tool, the data size changes slightly before and after.
The original data size is 904 bytes, and after the Sorting too, it varies from 891 to 901 bytes.

 

Given the extremely small size of the sample data, the data size difference can be amplied for the big data.

 

2024-01-29 135120.png

caltang
17 - Castor
17 - Castor

Yes it is normal. Nothing gets lost by the way, only order changes. 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
gawa
16 - Nebula
16 - Nebula

hi @chloehong445 Great observation! I didn't know that.

 

According to the manual, it says .yxdb format is compressed, so sorting data might help compress data in more compact way. (I'm not sure of the exact principle or algorithm though😅)

image.png

https://help.alteryx.com/current/en/designer/data-sources/alteryx-database-file-format.html#alteryx-...

 

aatalai
14 - Magnetar

you can also use the test tool for extra comfort that they are the same?

aatalai
14 - Magnetar

or atleast things such as number of records etc

Labels
Top Solution Authors