Previous version uses gorm.Model for declaring feeds.Item -- this includes a deleted_at field, which turns on a 'soft delete' functionality
Although gorm creates an index on deleted_at, in practice the queries were dramatically slower (650x slower in my testing!) than a query that didn't filter for deleted_at being NULL
Since we don't need the soft delete functionality, we're now declaring the gorm fields ID, CreatedAt and UpdatedAt directly in the feeds.Item struct
feeds.Item
-- this includes adeleted_at
field, which turns on a 'soft delete' functionalitydeleted_at
, in practice the queries were dramatically slower (650x slower in my testing!) than a query that didn't filter fordeleted_at
beingNULL
feeds.Item
struct