tds-fdw / tds_fdw

A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Other
380 stars 102 forks source link

sql query is executed twice #154

Open maipeng opened 6 years ago

maipeng commented 6 years ago

Hello,

i've installed tds_fdw 1.0.8 on postgresql 9.5 . When I run a simple select from a foreign table, my sql profiler show me the querie is executed twice on sql server. is it an issue ? thanks

GeoffMontee commented 6 years ago

Please set remote_estimate_method for the table to showplan_all to avoid this problem on MS SQL Server.

https://github.com/tds-fdw/tds_fdw/blob/master/ForeignTableCreation.md

SudoerWithAnOpinion commented 6 years ago

@maipeng, if Geoff has solved your problem, can you close this issue?

ParisaRashidi commented 4 years ago

thanks a million, you solved my problem. @GeoffMontee I wanted to create a table in SQL server with tds_fdw, but the query ran twice.