Re: [GENERAL] Re: Unable to understand index only scan as it is not happening for one table while it happens for other

2017-06-27 Thread Gary Evans
Hi Rajan, I would say that the optimiser has calculated that it would be quicker to sequentially read thought the table to get the 354 rows returned without the limit. By introducing the limit, it is much faster to pick out the first 10 rows using the index. Using an index is usually only quicke

Re: [GENERAL] Locking question

2016-10-26 Thread Gary Evans
Hi, Personally, I like to make the database responsible for the integrity of the data within it as much as possible. And therefore would favour Depsesz's solution to trying to manage it within the application. Cheers Gary On Wed, Oct 26, 2016 at 8:18 PM, Frank Millman wrote: > > *From:* huber

Re: [GENERAL] Vacuum Full - Questions

2016-08-31 Thread Gary Evans
Hi Patrick, I believe Vacuum full rebuilds the indexes automatically by default, as a new copy of the table is created. Because the indexes are new, no stats are available to the optimiser to make an informed decision about whether to utilise it or not, so it doesn't. Once the analyze is perform