Welcome Guest, Not a member yet? Register   Sign In
softDelete and database indexing
#4

(08-21-2019, 04:09 PM)includebeer Wrote:
(08-21-2019, 02:03 PM)php_rocs Wrote: @MGatner,

There is no need to index that field. It's only purpose is to exclude the deleted records from queries that should only show non deleted records.

If it’s used in every request then it could be a good idea to index it. But it I think it will only improve performance if you have a lot of record. For a small table, it won’t make a difference.

I disagree because there is no gains in indexing speed (regardless of the database size).  This is assuming that the field is boolean.  Sometimes you can over index.
Reply


Messages In This Thread
softDelete and database indexing - by MGatner - 08-21-2019, 11:23 AM
RE: softDelete and database indexing - by php_rocs - 08-21-2019, 08:23 PM
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



Theme © iAndrew 2016 - Forum software by © MyBB