JustZack / audit-congress

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

Separate `BillSummaries` text from the table #101

Open JustZack opened 5 months ago

JustZack commented 5 months ago

Queries against BillSummaries can be very slow, probably because the size of the text stored in that column. Split the text column into its own table and reference summaries via its ID instead.

From the API's perspective, nothing should change. But the table will now need to join on the summary ID to get the summary.

JustZack commented 5 months ago

The goal is to make summaries easily searchable.

So what if instead some work was done on summaries as they were inserted to determine every unique (key) word, then a much smaller table can be used to find bill summaries with certain keywords. Probably still need to split off the large summary text though.