Re: Using Natural Language to Query SQL Databases with Python LangChain Module Programming Computer Science by aishamushtaq very helpful Re: Printing multiple integers EASY SOLUTION Programming Software Development by Bunker A straightforward solution to printing multiple integers is to use a loop. For example, in Python, you could use a "for" loop to iterate through a list of integers and print each one. This method is simple and effective. Using Natural Language to Query SQL Databases with Python LangChain Module Programming Computer Science by usmanmalik57 …Required Libraries To connect your Python application with PostgreSQL and MySQL, you must install the PostGreSQL and MySQL connectors. Execute the following … ``` # connector for PostgreSQL !pip install psycopg2 # connector for MySQL !pip install mysql-connector-python ``` ## Defining the LLM and Agent As previously said, I… Re: Improve HAVING BY performance Programming Databases by Biiim > I don't have experience with MariaDB, but in MySQL, something like that will work as long as I do ….* and the creator continued developing MariaDB and Oracle took MySQL - so that's why they are very similar as in … are insanely fast, I remember the speed jump of my MySQL server back circa 2008-2010 from a HDD to SSD… Re: Improve HAVING BY performance Programming Databases by toneewa …, I want to share my experience learning MySQL in the past day. I setup a…comment(lib, "mysqlcppconn.lib") // For MySQL Connector/C++ version 6 #pragma comment(lib, &…main(){ while(ct!=5){ try { driver = sql::mysql::get_mysql_driver_instance(); con = driver->connect("tcp://127.… Re: Improve HAVING BY performance Programming Databases by Dani …; 10 I don't have experience with MariaDB, but in MySQL, something like that will work as long as I do… Re: Improve HAVING BY performance Programming Databases by toneewa … MAX(Price). With a database over 305K rows, 3 columns, MySQL Workbench is unstable importing. Took over 2 hours. WHERE is… Re: Improve HAVING BY performance Programming Databases by Biiim … impact on the speed You can also fine tune the MySQL system variables to better handle the queries you want to… Re: Improve HAVING BY performance Programming Databases by toneewa … your mentioned alter table index. Took 4.375 secs in MySQL Workbench. It did speed up the results. I'll have… Question Answering with YouTube Videos Using RAG in LangChain Programming Computer Science by usmanmalik57 …language-to-query-sql-databases-with-python-langchain-module), using the Python [LangChain module](https://python.langchain.com/docs/get_started/introduction) … ``` The script below imports the required libraries into our Python application. ``` from langchain_community.document_loaders import YoutubeLoader from langchain_openai import… Mariadb10.11.6 Glarea single failed node startup stuck failure Programming Databases by mx_983 …; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.keep_plaintext_size = 128M; gcache.mem_size = 0; gcache….log --pid-file=/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock --wsrep_start_position=20c1183c-e5c5-11ee-9129-97e9406cb3f8:7183126' WSREP_SST: [INFO… Middle Aged Needing Career Advice Community Center Geeks' Lounge by BigPaw … back into developing, and so I'm learning Python. Where should I go with Python, though? I'm a troubleshooter by nature… Re: Which programming language is best Ludo game development? Programming Game Development by kishanrg … development, including Ludo games, are C++, C#, Java, JavaScript, and Python. Ultimately, the "best" programming language for Ludo game… Re: DaniWeb Auto Answer A.I. feature Community Center Meta DaniWeb by toneewa …. There was a link to a [python api](https://github.com/rpehkone/Chat-With-RTX-python-api). That was just an example… Re: Read file properties of video files in C++ Programming Software Development by rproffitt … the man who was turned into a newt in Monty Python who said "I got better", such are better… Re: DaniWeb Auto Answer A.I. feature Community Center Meta DaniWeb by Dani Pardon my cluelessness here. A $300 video card can efficiently perform complex AI tasks against DaniWeb’s entire database in real time? Missed the link to the Python API. Re: How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Hanginium65 Good day, Salem. My apologies for taking so long to reply to your suggestion. I refactored my code to read the contents of the tar.bz2 file and then pass them as a file-like object to the 'put_object' and also to change the content type for the file transfer to "application/octet-stream". The first was sent through to object storage … Re: How can I upload a tar.bz2 file to openstack swift object storage container Programming Software Development by Salem I don't understand why you need to extract all the files from the compressed `tar.bz2` just to upload to a backup. Also, line 69 is now meaningless having just posted only a snippet of the code. Before the error, what was the last `logger.info` message? Re: Improve HAVING BY performance Programming Databases by Biiim I realise this has been marked as solved, but I wanted to make it known that the HAVING clause runs on the returned result set of your query, which as you say has no indexes on it as it is just a temporarily created result set - but has the benefit of allowing you do do some simple post-processing on the result set. (This is for MariaDB at least)… Re: Improve HAVING BY performance Programming Databases by Reverend Jim Was it worth all that for 50ms? Re: Improve HAVING BY performance Programming Databases by Dani In exchange for less than a day's worth of work? Of course!!!!! I've spent a *lot* longer to shave off a *lot* less. https://www.conductor.com/academy/page-speed-resources/faq/amazon-page-speed-study/ Re: Improve HAVING BY performance Programming Databases by Dani Now as far as whether going down that rabbit hole that day was worth the cost of losing AndreRet, then I'd have to give a resounding no. Re: Improve HAVING BY performance Programming Databases by Reverend Jim I have to admit that 95% of my work from 1995 to 2008 was back end stuff where I didn't have to worry about stuff like that. Digital plumbing and monitoring. The other 5% was single user apps. Not counting the 20% which was pointless meetings. So if you don't mind explaining, I'm curious as to why 50ms would even be noticible. I'm not asking just … Re: Improve HAVING BY performance Programming Databases by Dani I'm too exhausted for an in depth explanation right now but 90% of web development is optimizing for performance. The average DaniWeb page takes anywhere from 80ms up to 250ms to load the HTML (when dealing with low network latency), depending on the type of page, so shaving 50ms off of that is a huge win. Re: Improve HAVING BY performance Programming Databases by Dani Here are some articles that can explain it in greater depth: * https://web.dev/learn/performance/why-speed-matters * https://developer.mozilla.org/en-US/docs/Learn/Performance * https://web.dev/explore/fast The HTML page must be downloaded in its entirety before the web browser can begin loading anything else (CSS, Javascript, images, etc.)… Re: Improve HAVING BY performance Programming Databases by Reverend Jim I suppose I am looking at it in terms of practicality. I suppose there might be several reasons to optimize: 1. It saves resources on the hosting platform 2. It improves the user experience 3. It provides personl satisfaction Point #1 would save you money if the savings were significant. Point #2 would apply if the improvement was … Re: Improve HAVING BY performance Programming Databases by Dani > Point #2 would apply if the improvement was noticible but I doubt anyone could seriously comment, "I think this page rendered 50ms faster than it used to", especially considering all the other things that affect timing, for example, the current loading on my ISP servers, anything else running on my computer or home network, etc. … Re: Improve HAVING BY performance Programming Databases by Dani > I know that in my experience, OR's are very bad for speed you can get away with a few but they can get very bad when they stop the whole query making use of one of the main indexes, you can actually speed it up by moving the or's into the HAVING usually. Thank you for that tip! I never thought of that, but it totally makes sense!! > … Re: Improve HAVING BY performance Programming Databases by Dani But you're not comparing apples to apples. Your WHERE query and your HAVING query perform different calculations and do different things. In one, you're plucking out all the rows with a price greater than $4, and then calculating an average price for each product. In the other, you're plucking out *all* rows, calculating an average price for each … Re: Improve HAVING BY performance Programming Databases by toneewa Correct. It wasn't about displaying the results, but to measure the different clauses. I'm not impressed by only 95 INSERTs/sec, and a maximum write speed of 175 KB/s for importing data. Increasing to 50K shows WHERE to be faster. 50K: WHERE Query execution time: 0.0599129 seconds HAVING Query execution time: 0.0621748 …