Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??

From: "David B" <postgresql(at)thegatelys(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??
Date: 2003-12-09 21:35:24
Message-ID: GOEGKICPFOPNLIEIHGFJGEJMCEAA.postgresql@thegatelys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2003-12-09 21:45:46 Re: Faster performance when using where cust_id = '123' vs cust_id = 123. Does 7.4 fix this??
Previous Message Peter Eisentraut 2003-12-09 20:21:37 Re: Fetch a single record