Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this?? - Mailing list pgsql-sql

From David B
Subject Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??
Date
Msg-id GOEGKICPFOPNLIEIHGFJGEJMCEAA.postgresql@thegatelys.com
Whole thread Raw
Responses Re: Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-sql
We have got used to the problem that queries of the format:

select *
from customer
where cust_id = '123' are much much faster than

select *
from customer
where cust_id = 123

(where cust_id is defined as bigint).

a. Why is this.

b. Will moving to v7.4 change this so we can avoid the whole '123' casting
thing.

Tx folks,
D



pgsql-sql by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fetch a single record
Next
From: Peter Eisentraut
Date:
Subject: Re: Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??