Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make multiple queries on the same file efficiently #17

Open
JonathanGirardeau opened this issue Oct 14, 2024 · 0 comments
Open

Comments

@JonathanGirardeau
Copy link

JonathanGirardeau commented Oct 14, 2024

Hello,

I use Rasqal to parse a TTL file with ~1000 triples. I execute ~350 SPARQL queries to get all info that I need in that file.
It takes ~45sec to do that, it seems super slow to me.

I have been trying to reduce this time without success so far:

  • I have tried to reuse the same data graph for all my queries but it is impossible since the data graph is freed when I free the query.
  • I have tried to use the same query object for all my queries (multiple calls of rasqal_query_prepare and rasqal_query_execute on the same query) , but it does not work.
  • For each query, I use a copy of the data graph by calling rasqal_new_data_graph_from_data_graph instead of creating a new one by calling rasqal_new_data_graph_from_uri, but it does not reduce execution time.

Do the file is read from the filesystem for each query ? It would explain the slowness of it.

@JonathanGirardeau JonathanGirardeau changed the title How to make multiple querry on the same data graph efficiently How to make multiple queries on the same data graph efficiently Oct 14, 2024
@JonathanGirardeau JonathanGirardeau changed the title How to make multiple queries on the same data graph efficiently How to make multiple queries on the same file efficiently Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant