3 Ways to Interact with Kùzu: Using Python, Rust, CLI

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 2

  • @DearGeorge3
    @DearGeorge3 2 месяца назад

    Thanks! Why kuzu doesn't have native API, like cursors for node tables, for fetching and updating or deleting links 'in place' via node references, etc.? This would increase performance in Python by 10 times or more by eliminating the need to create and decode queries, planning (it just direct call few C++ already existing code lines) and would significantly simplify programming in most scenarios. Cypher is great, but native API has superiority in speed and conciseness.

    • @KuzuDB
      @KuzuDB  2 месяца назад

      Hi @DearGeorge3, thanks for checking out the video! There are a few reasons why we think updates/deletion with a native API is unlikely to be faster than Cypher.
      1. Kùzu is not an in-memory system (it is fully disk-based), so updating/deleting by cursor/pointer does not mean we can directly update the memory object that the cursor is pointing to - we'd still need to go through the same thing at the storage level.
      2. The Python API in Kùzu is a simple wrapper over C++. We do not parse / decode / plan queries in Python at any stage, but rather simply pass the query string to the C++ layer that does planning, binding and execution, so querying your database from Python should basically be roughly as fast as querying from any other API.
      3. Compared to query execution (which can get really expensive real quick), query planning is the faster operation, and any additional overheads in Python are likely to be negligible.
      Please join us in Discord to discuss more details if required, and cheers!