Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SQL Query very slow
#9
Quote:Is the name the only way the two tables are related? There's no ids or anything?
Unfortunately yes, however new tables will have PlaceId code

Quote:Depending on how much control you have, rebuilding the table to use a fulltext search engine would make it work as expected, if you use the keyword 'match' instead of 'like'
This is a possibility, however once Id's have been added, this query will never have to be performed again.

Quote:Or, you can use pragma declarations to let sql know you don't care about case sensitivity, then it might decide to use the index:
probably a good idea

Quote:sqlite apparently doesn't let you alter tables that already exist, so you can't modify the collation of a preexisting table. But you can create a temporary table to hold the contents, drop the table, recreate it using the proper collation, then put the data back in:https://stackoverflow.com/a/47469890

sqlite is a temporary solution. I plan on converting all to PostGreSQL ASAP.
legacy prevents me from doing that until I put out some fires that I didn't start.

I will try your code suggestion, it looks like a good solution.

It's coming back to me slowly, it's been quite a while since I had to so any SQL other than simple stuff, But had many years experience with ORACLE, Sybase and Informix (20+ years ago)
Reply


Messages In This Thread
SQL Query very slow - by Larz60+ - May-18-2019, 11:02 PM
RE: SQL Query very slow - by MvGulik - May-19-2019, 12:23 PM
RE: SQL Query very slow - by ichabod801 - May-19-2019, 02:07 PM
RE: SQL Query very slow - by Larz60+ - May-19-2019, 03:47 PM
RE: SQL Query very slow - by richalt2 - May-20-2019, 04:32 PM
RE: SQL Query very slow - by Larz60+ - May-20-2019, 05:11 PM
RE: SQL Query very slow - by MvGulik - May-21-2019, 06:50 AM
RE: SQL Query very slow - by nilamo - May-21-2019, 06:12 PM
RE: SQL Query very slow - by Larz60+ - May-21-2019, 10:34 PM
RE: SQL Query very slow - by Mark87 - Jun-23-2019, 11:43 AM
RE: SQL Query very slow - by Larz60+ - Jun-23-2019, 04:11 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020