Hi,
and I got this query plan:

Why the execution time increases when creating a spatial index on a table containing a large amount of data?
I'm using postgresql 9.6.4 on linux and I'm trying to execute this query on a table contains 51000 rows.

and I got this query plan:

Creation of index:
I get this queryPlan:

I get this queryPlan:

Why the execution time increases when creating a spatial index on a table containing a large amount of data?