Re: [PERFORM] Advice on optimizing select/index

2013-06-03 Thread Jeff Janes
On Wed, May 22, 2013 at 7:37 AM, Niels Kristian Schjødt < nielskrist...@autouncle.com> wrote: > > One idea I'm thinking of my self is that I have a column called state on > the adverts which can either be 'active' or 'deactivated'. The absolute > amount of 'active adverts are relatively constant (

Re: [PERFORM] Advice on optimizing select/index

2013-05-26 Thread Robert Klemme
On 22.05.2013 16:37, Niels Kristian Schjødt wrote: In reality the adverts that are selected is all 'active'. I'm hence wondering if it theoretically (and in reality of cause) would make my query faster if I did something like: "SELECT .* FROM cars LEFT OUTER JOIN adverts on cars.id = adverts.ca

[PERFORM] Advice on optimizing select/index

2013-05-22 Thread Niels Kristian Schjødt
Hi, I have a database where one of my tables (Adverts) are requested a LOT. It's a relatively narrow table with 12 columns, but the size is growing pretty rapidly. The table is used i relation to another one called (Car), and in the form of "cars has many adverts". I have indexed the foreign key