1 year ago
#299403
t3chb0t
Get data from between temporary table create and drop
I have optimized the peformance of one of my SQLite scripts by adding a temporary table so now it looks like this:
create temp table temp.cache as select * from (...);
--- Complex query.
select * from (...);
drop table temp.cache;
The issue with this solution is that I no longer can use Pandas' pd.read_sql_query
because it doesn't return any result and throws an exception saying I'm allowed to execute only a single statement.
What would you say is the preferable solution? I can think of two:
- Plan-A: There is some trick to extract the data anyway or
- Plan-B: I need to call python's SQLite
execute
function before and after using Pandas to handle the temporary table.
python-3.x
pandas
sqlite
temp-tables
0 Answers
Your Answer