KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ xasc data on disk (compressed)

  • xasc data on disk (compressed)

    Posted by pcarroll on March 9, 2022 at 12:00 am

    From a question on topicbox: 
    Sorting data on disk as per code.kx.com, even when compressed

     

    q).z.zd:17 2 6 
    q)tab:flip {`dt`tm`sym`ap`bp!(x?.z.d+til 10;x?08:00+01:00*til 8;x?4?`4;x?5.0;x?5.0)}10000 
    q)`:db/tab/ set .Q.en[`:db]tab `:db/tab/ 
    q)meta get `:db/tab/ 
    c | t f a 
    ---| ----- 
    dt | d 
    tm | u 
    sym| s 
    ap | f 
    bp | f 
    q)`tm xasc `:db/tab/ `:db/tab/ 
    q)meta get `:db/tab/ 
    c | t f a 
    ---| ----- 
    dt | d 
    tm | u s 
    sym| s 
    ap | f 
    bp | f 
    q)-21!`:db/tab/dt 
    compressedLength | 6611 
    uncompressedLength| 40016 
    algorithm | 2i 
    logicalBlockSize | 17i 
    zipLevel | 6i

     

     

     

    pcarroll replied 9 months, 1 week ago 2 Members · 1 Reply
  • 1 Reply
  • leahs

    Member
    March 10, 2022 at 12:00 am

    Thanks for highlighting @PCarroll, code.kx provides great references!

    Happy Coding, 

    Leah

Log in to reply.