[GENERAL] Optimized Select Statement

2010-01-06 Thread Yan Cheng Cheok
I am having the table with 1 million rows. I know there can be multiple YanChengCHEOK. But in certain situation, I will be only interested in 1 YanChengCHEOK. I try to perform SELECT query. SemiconductorInspection=# SELECT measurement_type_id FROM measurement_type WHERE

Re: [GENERAL] Optimized Select Statement

2010-01-06 Thread Ivan Sergio Borgonovo
On Wed, 6 Jan 2010 17:45:31 -0800 (PST) Yan Cheng Cheok ycch...@yahoo.com wrote: situation, I will be only interested in 1 YanChengCHEOK. SELECT measurement_type_id INTO _measurement_type_id FROM measurement_type WHERE measurement_type_name='YanChengCHEOK'; LIMIT 1 Is that what you