Subject | Re: [firebird-support] Re: commit after insert is very slow |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2010-03-03T20:54:40Z |
03.03.2010 20:34, svanderclock wrote:
only 200 of them. Why you can't add condition for price? Anyway you'll
never show houses with low prices with this query... Say, if all 200
results fit to $5000000 limit, you easily can add "price > 5000000" and
get small result set which is sorted instantly.
--
SY, SD.
> yes but imagine if you have one index on Agent and one for ID_locationBut there is no point to have 100 000 rows in resut set if you need
> so in this way the query
> select .. where agent = xxx and ID_location=yyyy is fast but the order by price (if the result gave> 100 000 rows) destroy everything. in this case is better to use an index on the price and not index at all on agent or id_location. in fact it's completely depend on the situation. for exemple you say that NB_ROOM> 30 is a very rare case (it's a sample), it's true... but it's these rare case that can crash you fb_server (all ressources are uses)!
only 200 of them. Why you can't add condition for price? Anyway you'll
never show houses with low prices with this query... Say, if all 200
results fit to $5000000 limit, you easily can add "price > 5000000" and
get small result set which is sorted instantly.
--
SY, SD.