X
Tap here to go to the mobile version of the site.
Scheduled maintenance: Monday, March 30, between 3:30pm and 5:30pm UTC. This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn’t solve your issue and you want to ask a question, we have our support community waiting to help you at @firefox on Twitter

Support Forum

Help in Cleaning places.sqlite using SQLite queries/scripts

Posted

Hello,

First I might not be using the right terminology/words/terms. So forgive my layman mistakes.

I am trying to clean up places.sqlite using a 3rd party software/plugin as it is much faster. I am having issues creating the SQLite script.

I would like to do two things:

1) Remove all items from the table moz_places that contain certain words in the URL and also remove it's corresponding/linked rows in moz_historyvisits

2) (MORE IMPORTANT) Remove all moz_histroyvisits that do not have corresponding rows in moz_places


Thank you

Hello, First I might not be using the right terminology/words/terms. So forgive my layman mistakes. I am trying to clean up places.sqlite using a 3rd party software/plugin as it is much faster. I am having issues creating the SQLite script. I would like to do two things: 1) Remove all items from the table moz_places that contain certain words in the URL and also remove it's corresponding/linked rows in moz_historyvisits 2) (MORE IMPORTANT) Remove all moz_histroyvisits that do not have corresponding rows in moz_places Thank you

Modified by ProfessorLayman

Quote

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0 Waterfox/56.3

More Information

jscher2000
  • Top 10 Contributor
8950 solutions 73359 answers

Helpful Reply

There's no add-on for this?


Please make sure Firefox has fully shut down before modifying places.sqlite externally. There usually are two journaling files that may not be fully merged until shutdown.

On #1: There probably is a good place to get help with SQLite's query language. (I usually work with Microsoft T-SQL and don't know how you delete records in SQLite.)

On #2: There shouldn't be any records in moz_historyvisits that do not have a corresponding record in moz_places. I think what you would do is an outer join where a field from moz_places is null. However, please consider that a guess.

There's no add-on for this? ---- Please make sure Firefox has fully shut down before modifying places.sqlite externally. There usually are two journaling files that may not be fully merged until shutdown. On #1: There probably is a good place to get help with SQLite's query language. (I usually work with Microsoft T-SQL and don't know how you delete records in SQLite.) On #2: There shouldn't be any records in moz_historyvisits that do not have a corresponding record in moz_places. I think what you would do is an outer join where a field from moz_places is null. However, please consider that a guess.
Was this helpful to you? 1
Quote

Question owner

Thanks. I am using SQLite Manager addon.

Thanks. I am using SQLite Manager addon.
Was this helpful to you?
Quote
jscher2000
  • Top 10 Contributor
8950 solutions 73359 answers

ProfessorLayman said

I am using SQLite Manager addon.

I don't know whether the SQLite Manager add-on can modify the live file, or only works with a copy. ??

''ProfessorLayman [[#answer-1289444|said]]'' <blockquote> I am using SQLite Manager addon. </blockquote> I don't know whether the SQLite Manager add-on can modify the live file, or only works with a copy. ??
Was this helpful to you?
Quote
Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.