Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3312502
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:00:11+00:00 2026-05-17T22:00:11+00:00

I have a database of ways and nodes. A way is defined by two

  • 0

I have a database of ways and nodes. A way is defined by two or more nodes. The list of node_id’s that a way contains are stored in the way_nodes table.

I have a table of node joins, points where two or more ways join. A join is defined as two or more ways having the same node. I’m looking to find the ways that have joins. So trying something like this:

SELECT DISTINCT 
       way_id 
  FROM way_nodes wn 
  JOIN path_vectors pv ON pv.node_id = wn.node_id

The table path_vectors contains a list of all nodes which are joins between ways, it is precalculated.

I found it was too slow, maybe 5 ways per second, with my large ~10,000 way and ~40,000 node database. This is related to my previous question.

The goal with this information is to simplify road networks into a simple graph, which can be used with a pathfinder to plot an optimal route. I’m using Open Street Map data, hence the similar terminology.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:00:12+00:00Added an answer on May 17, 2026 at 10:00 pm

    As I understand it, you are trying to build a list of all way_id values from the way_nodes table, where there is a corresponding node_id on the path_vectors table.

    If all node_id values are stored on the path_vectors table, this can be simplified to:

    select distinct way_id from way_nodes
    

    If not all node_id values are stored on the path_vectors table, this may be the most efficient way to query the values:

    select distinct way_id from way_nodes wn
    where exists
    (select null from path_vectors pv
     where wn.node_id = pv.node_id)
    

    I suggest checking that there is an index on the node_id field on the path_vectors table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database that contains a date and we are using the MaskedEditExtender
I have database with many tables. In the first table, I have a field
I have a database table and one of the fields (not the primary key)
I have a database with two tables ( Table1 and Table2 ). They both
I have a database file that is generated on a PC using Sqlite. This
I have a database column WantsReply that logically holds a boolean (bit) but is
I have an excel document that queries an SQL Database on button press. The
I have a Python command line script that connects to a database, generates files
Suppose i have an XML file, that i use as local database, like this):
I have designed database tables (normalised, on an MS SQL server) and created a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.