KX Community

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

Home Forums kdb+ Keyed Table Mechanics

  • Keyed Table Mechanics

    Posted by ptech127 on March 19, 2022 at 12:00 am

    Why does the select function store the values of kt out of order with respect to the values of t?

    ptech127 replied 8 months, 1 week ago 2 Members · 1 Reply
  • 1 Reply
  • pfullen1997

    Member
    March 20, 2022 at 12:00 am

    The values aren’t stored out of order. As the ID column is acting as a foreign key, the corresponding v values to each ID from the kt table are as follows:

    ID          v
    1002        200
    1001        100
    1003        300
    1001        100

    That’s why they appear in the order they do in the select query. Hopefully that’s clear enough.

Log in to reply.