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

Optimize queries table #1255

Merged
merged 10 commits into from
Jan 16, 2022
Merged

Optimize queries table #1255

merged 10 commits into from
Jan 16, 2022

Commits on Dec 16, 2021

  1. Optimize queries table by separating domain, client, and forward stri…

    …ngs into a linking table and referencing them by an ID. This also allows storing (IP,hostname) pair for clients.
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    6c82a9c View commit details
    Browse the repository at this point in the history
  2. Utilize new queries_storage and link-tables for the queries table

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    1cd6f04 View commit details
    Browse the repository at this point in the history
  3. Use table name query_storage

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    beae1b3 View commit details
    Browse the repository at this point in the history
  4. Use the SQLITE_PREPARE_PERSISTENT flag is a hint to the query planner…

    … that the prepared statement will be retained for a long time and probably reused many times. Without this flag, SQLite3 assumes that the prepared statement will be used just once or at most a few times and then destroyed relatively soon. The current implementation acts on this hint by avoiding the use of [lookaside memory] so as not to deplete the limited store of lookaside memory. Also, update the tests for the expected database schema after renaming the table and adding the new view.
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    d134a49 View commit details
    Browse the repository at this point in the history
  5. Create and use link table for additional_info column

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    f350ce5 View commit details
    Browse the repository at this point in the history
  6. Do not use AUTOINCREMENT as it will add gaps between the IDs even if …

    …nothing is actually INSERTed as we chose the OR IGNORE path.
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 16, 2021
    Configuration menu
    Copy the full SHA
    4516ee2 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2021

  1. Configuration menu
    Copy the full SHA
    6dfb98b View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2021

  1. Configuration menu
    Copy the full SHA
    256ed71 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. Configuration menu
    Copy the full SHA
    8cdc8ed View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2022

  1. Use query_storage instead of queries when removing old queries and wh…

    …en couting them
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 9, 2022
    Configuration menu
    Copy the full SHA
    feac92e View commit details
    Browse the repository at this point in the history