JustZack / audit-congress

A website collecting & displaying information about the activities of congress.
0 stars 0 forks source link

Try merging new bill info into live bill info (for speed) #64

Closed JustZack closed 6 months ago

JustZack commented 6 months ago

Such that each time new data is fetched via the bill cache script, data is initially placed in a temporary table (exactly like the table it will end up in)

Then can merge the two tables with a special insert statement: https://stackoverflow.com/questions/725556/how-can-i-merge-two-mysql-tables https://stackoverflow.com/questions/548541/insert-ignore-vs-insert-on-duplicate-key-update

MAYBE bulk inserting into a fresh table, then using the special insert syntax is faster than bulk inserting into the same tables & dropping rows

JustZack commented 6 months ago

If this works #63 is not needed as information will never need to be dropped, only updated.