Start a new topic

Row limit not being applied to SELECT query

[This topic is migrated from our old forums. The original author name has been removed]

When I click on the data tab in the Object view the query that is run on the database server does not include the limit clause even when I set Max Rows. (ie. The query that is run is "SELECT * FROM table" and not "SELECT * FROM table LIMIT 200". This causes my PC to freeze up as I have tables of 100GB. I suspect the reason for this is that I am using an unconventional JDBC driver: Vertica 6.0.0 Is there a way to configure DBvis to always include the LIMIT clause? Edited by: Mike on Aug 29, 2012 6:25 PM

[This reply is migrated from our old forums.]

Re: Row limit not being applied to SELECT query
Mike, The Vertica driver currently don't properly limit the number of rows being returned. We will look into a workaround in DbVisualizer. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Row limit not being applied to SELECT query
Hi Roger I have added a bit of a hack to get this this to work. I modified the the SQL Templates for the connection to force the LIMIT clause. (ie. "select * from $$schema$$$$schemaseparator$$$$table$$ LIMIT 1000") Obviously not great, but its works. Is there a better solution than this? thanks Mike Edited by: Mike on Sep 4, 2012 12:22 PM
[This reply is migrated from our old forums.]

Re: Row limit not being applied to SELECT query
Mike, The workaround should work fine. Just be aware that there may be error(s) if you are using the data filtering feature in the Data tab. As long as you don't apply any filter (WHERE statement) or ORDER BY clause it should work. Regards Roger