3 EXPLAIN="EXPLAIN(ANALYZE,COSTS)"
5 echo "ex1.5.b unoptimized"
6 echo "${EXPLAIN} SELECT score FROM comments WHERE lower(substring(text for 3)) = 'yes';" | psql
8 echo "ex1.5.b optimized"
9 echo "${EXPLAIN} SELECT score FROM comments WHERE text ILIKE 'yes\%';" | psql