[SQL] SQLMAP IBATIS insert values from web forms to a money type column
Hello, I am using SQLMAP ibatis to do DB insertion for a webapplication. In my sqlmap.xml file, I was trying to insert values into a table with one col (type is Money), but in java, I could not find Money type. Does someone knows about ibatis how to make values got from the web form to be inserted into money type column through IBATIS ? Thanks a lot! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [SQL] SQLMAP IBATIS insert values from web forms to a money type column
The money type is deprecated. Use numeric with two places. A On Mon, Aug 14, 2006 at 09:49:29AM -0400, Emi Lu wrote: > Hello, > > I am using SQLMAP ibatis to do DB insertion for a webapplication. > > In my sqlmap.xml file, I was trying to insert values into a table with > one col (type is Money), but in java, I could not find Money type. > > Does someone knows about ibatis how to make values got from the web form > to be inserted into money type column through IBATIS ? > > Thanks a lot! > > > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match -- Andrew Sullivan | [EMAIL PROTECTED] When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[SQL] Multiple DB join
Hi All, I have a database which consists of 20 million records and I've split up the db into 6-7 dbs. I have a base database which consists of the ids with link all the databases. I'm performing search on this single base table. After searching i get some ids which are ids in the other databases which i split up. Now i need to retrieve those records. Is there a way i can join tables from multiple databases as we can join multiple tables in a single database. Thanks, SA. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [SQL] Multiple DB join
I think using the contrib module 'dblink' (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/) can help you here.Thanks, -- Shoaib MirEnterpriseDB (www.enterprisedb.com)On 8/15/06, Sumeet Ambre < [EMAIL PROTECTED]> wrote:Hi All,I have a database which consists of 20 million records and I've split up the db into 6-7 dbs. I have a base database which consists ofthe ids with link all the databases. I'm performing search on thissingle base table. After searching i get some ids which are ids in the otherdatabases which i split up. Now i need to retrieve those records. Is there a way i can join tables from multiple databases as we can joinmultiple tablesin a single database.Thanks,SA.---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [SQL] Using bitmap index scans-more efficient
Florian Weimer wrote: * Kyle Bateman: Any ideas about whether/how this can be done? If the project tree is fairly consistent, it's convenient to encode it using intervals instead of parent/child intervals. IIRC, Celko's "SQL for smarties" explains how to do this, and Kristian Koehntopp has written some PHP code to implement it. I agree that this produces a more efficient query for finding the projects that are the progeny of another project, but I'm trying to figure out how that helps me select the right project transactions from my ledger efficiently. This query produces wonderful results (very fast): select * from ledger where proj >= 4737 and proj <= 4740; But I'm assuming that using an interval-encoded project tree, I would have to do something like the following to get a progency group: select * from ledger l, proj p where p.proj_id = l.proj and p.left > 1234 and p.right < 2345; The problem (at least according to my initial testing) is that this forces a join of the entire ledger and I get my slowest performance group (5 seconds). What am I missing? Kyle ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] Using bitmap index scans-more efficient
Kyle Bateman <[EMAIL PROTECTED]> writes: > But I'm assuming that using an interval-encoded project tree, I would > have to do something like the following to get a progency group: > select * from ledger l, proj p where p.proj_id = l.proj and p.left > > 1234 and p.right < 2345; btree has no idea about the constraint (that I imagine exists) that left <= right. If you're just doing a simple index on (left, right) then the above query requires scanning all index entries with left > 1234. It would probably help to say select * from ledger l, proj p where p.proj_id = l.proj and p.left > 1234 and p.left < 2345 and p.right < 2345; so that you can constrain the range of "left" values scanned. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
