Hi, It is rather hard say how it would influence the speed in your environment. Explain (http://www.evolane.com/support/manuals/shared/manuals/postgresql/html/sql-explain.html) should give you some numbers to compare and http://developer.postgresql.org/pgdocs/postgres/planner-optimizer.html some more background.
-Jukka Rahkonen- Mâ¡rtin Koppenhoefer kirjoitti: > 2011/6/22 Peter Körner <[email protected]>: >>> (CASE WHEN "name:en" IS NOT NULL THEN "name:en" ELSE name END) AS name >> >> Simpler: >> >> COALESCE("name:en", "name") >> >> >> COALESCE selects the first none-null value from a chain. > > > thank you for this Peter. Can anyone tell how much this influences the > speed? Is it noticably slower to check a list like COALESCE("name:en", > "name:it", "name:de", "int_name", "name") compared to a simple name > select? Do I suppose correctly that COALESCE is faster for multiple > keys then nested CASE WHENs ? And what about regex-s (e.g. check for > non-latin characters and only use in these cases a different name) and > selection speed? > > Cheers, > Martin > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev > _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

