[HACKERS] how to implement selectivity injection in postgresql

2014-08-13 Thread Rajmohan C
SELECT c1, c2, c3, FROM T1, T2, T3 WHERE T1.x = T2.x AND T2.y=T3.y AND T1.x = ? selectivity 0.1 AND T2.y ? selectivity 0.5 AND T3.z = ? selectivity 0.2 AND T3.w = ? I need to implement Selectivity injection as shown in above query in PostgreSQL

[HACKERS] how to skip building certain paths in path tree

2014-07-21 Thread Rajmohan C
How do I modify PostgreSQL 9.3 source to skip certain join combinations (skip building certain paths in path tree) by checking some condition

[HACKERS] how to find the order of joins from Explain command XML plan output in PostgreSQL

2014-07-09 Thread Rajmohan C
EXPLAIN (format XML) command in PostgreSQL9.3.4 gives the plan chosen by the optimizer in XML format. In my program, I have to extract certain data about optimizer plan from this XML output. I am using *LibXML2* library for parsing the XML. I had successfully extracted information about which

[HACKERS] how to find the order of joins from Explain command XML plan output in PostgreSQL9.3.4

2014-07-06 Thread Rajmohan C
EXPLAIN (format XML) query command in PostgreSQL9.3.4 gives the plan chosen by the optimizer in XML format. In my program, I have to extract certain data about optimizer plan from this XML output. I am using *LibXML2* library for parsing the XML. I had successfully extracted information

[HACKERS] Estimating selectivity of predicates involving string pattern matching

2014-07-06 Thread Rajmohan C
I recently upgraded my machine from PostgreSQL8.3 to PostgreSQL9.3.4. After upgrade, when I ran TPC-H queries for performance testing, I could see drastic change in timings. Especially TPC-H query 5 which was taking 4 minutes to execute in pgsql8.3, took just 15 seconds in postgresql9.3.4. I think

[HACKERS] loading .so file at run time

2014-06-13 Thread Rajmohan C
I am working with Postgresql 9.3.4 source using eclipse IDE in ubuntu 14.04. I have a library file abc.so to be loaded at run time when postgresql server starts. When I run the server with -D /home/rajmohan/projects/TPCH_database as argument in run configuration, I could see LOG message abc.so

[HACKERS] unable to attach client process to postgresql server using gdb

2014-06-12 Thread Rajmohan C
hi, I am working with PostgreSQL 9.3.4 source using Eclipse IDE in ubuntu 14.04. I am facing a problem in attaching client process to postgresql server using gdb to debug. When I start the postmaster then I connect to it from client on a terminal. It works fine. Queries get responses. When I

[HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Rajmohan C
Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query.

[HACKERS] hooks not working in postgresql 9.3 (building from source)

2014-04-30 Thread Rajmohan C
hi, I need to use the hook feature of planner in postgresql 9.3 to perform a task. I am building postgresql from source. To start with, I wanted to know how to create a hook and attach that shared libray to postgresql. Hence i tried the examples given in

[HACKERS] Planner hints in Postgresql

2014-03-17 Thread Rajmohan C
I am implementing Planner hints in Postgresql to force the optimizer to select a particular plan for a query on request from sql input. I am having trouble in modifying the planner code. I want to create a path node of hint plan and make it the plan to be used by executor. How do I enforce this ?