Re: [PERFORM] Index not used with prepared statement

2005-09-11 Thread Guido Neitzer
On 11.09.2005, at 11:03 Uhr, Andreas Seltenreich wrote: I'm not perfectly sure, but since the index could only be used with a subset of all possible parameters (the pattern for like has to be left-anchored), I could imagine the planner has to avoid the index in order to produce an universal plan

Re: [PERFORM] Index not used with prepared statement

2005-09-11 Thread Andreas Seltenreich
Guido Neitzer schrob: > I have a performance problem with prepared statements (JDBC prepared > statement). > > This query: > > PreparedStatement st = conn.prepareStatement("SELECT id FROM > dga_dienstleister WHERE plz like '45257'"); > > does use an index. > > This query: > > String pl

[PERFORM] Index not used with prepared statement

2005-09-11 Thread Guido Neitzer
Hi. I have a performance problem with prepared statements (JDBC prepared statement). This query: PreparedStatement st = conn.prepareStatement("SELECT id FROM dga_dienstleister WHERE plz like '45257'"); does use an index. This query: String plz = "45257"; PreparedStateme