Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hmm. That sounds like a lot of time. How does your query look like for that?


    SELECT
        address,
        name,
        position,
        population,
        security,
        government,
        allegiance,
        primary_economy,
        secondary_economy,
        updated_at
    FROM systems
    WHERE ST_3DDWithin(position, $1, $2);
With the aforementioned index:

    "systems_position_idx" gist ("position" gist_geometry_ops_nd)


Ok, I see no obvious ways that is suboptimal. I assume there are no difference if you switch places of position and $1?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: