• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
softDelete and database indexing

#16
Yes, I switched it, you’re very right: find() queries whatever you have searched for plus “deleted_at IS NULL”

That’s interesting about NULL being in-indexable, I definitely never knew that. So far I’ve been adding (`deleted_at`, `id`) indexes to all my CI4 tables for models with soft deletes, and often one other like (`deleted_at`, `name`). Does the fact that deleted_at can be null mean these keys are useless? (I’m using MySQL but would like an agnostic solution)
Reply


Messages In This Thread
softDelete and database indexing - by MGatner - 08-21-2019, 11:23 AM
RE: softDelete and database indexing - by MGatner - 08-24-2019, 06:32 AM
RE: softDelete and database indexing - by MGatner - 08-25-2019, 03:56 AM
RE: softDelete and database indexing - by MGatner - 08-25-2019, 04:58 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.